akinomyoga / ble.sh

Bash Line Editor―a line editor written in pure Bash with syntax highlighting, auto suggestions, vim modes, etc. for Bash interactive sessions.
BSD 3-Clause "New" or "Revised" License
2.33k stars 77 forks source link

ln=target in LS_COLORS breaks ble.sh autocomplete highlight #449

Closed akhilkedia closed 4 weeks ago

akhilkedia commented 1 month ago

ble version: 0.4.0-devel4+59787ee result of pressing [Ctrl-x][Ctrl-v] in a ble.sh: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) [Ubuntu 22.04.4 LTS] ble.sh, version 0.4.0-devel4+59787ee (noarch) [git 2.45.1, GNU Make 4.3, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)] bash-completion, version 2.11 (hash:b42f5d6a7ad6d4921ec73838ba54a96d6bd30936, 77071 bytes) (noarch) locale: LANG=en_US.UTF-8 LC_ADDRESS=en_IN.UTF-8 LC_IDENTIFICATION=en_IN.UTF-8 LC_MEASUREMENT=en_IN.UTF-8 LC_MONETARY=en_IN.UTF-8 LC_NAME=en_IN.UTF-8 LC_NUMERIC=en_IN.UTF-8 LC_PAPER=en_IN.UTF-8 LC_TELEPHONE=en_IN.UTF-8 LC_TIME=en_IN.UTF-8 terminal: TERM=xterm-kitty wcwidth=15.0-west/15.1-2+ri, kitty:0 (1;4000;34)

The Problem if "ln=target" is present in the LS_COLORS environment variable, ble.sh prints an error when initializing the terminal -

bash: 10#0target: value too great for base (error token is "10#0target")

Thereafter, autocomplete with cd does not show any colors.

Corresponding config -

`bleopt filename_ls_colors="$LS_COLORS"`
akinomyoga commented 1 month ago

Thanks for the report and sorry for the late reply. I could easily reproduce the problem, so I was working on it by myself. After some investigations on applications supporting this seemingly undocumented feature, I decided to add the support for ln=target in ble.sh. I supported it in commit 365101cf e169e31d329a033fd789bc15d3edc252253ff628 (with another addition for the support for arbitrary suffixes). @akhilkedia You can update ble.sh by running ble-update in a ble.sh session. Could you check the behavior?

akhilkedia commented 4 weeks ago

Wow, thanks for the quick feature enhancement. Cheers :) The latest master of ble.sh does indeed work with "ln=target" in LS_COLORS, both for in-line syntax highlighting and for the autocomplete options.

The issue can be closed.

akinomyoga commented 4 weeks ago

Thanks for the confirmation of the behavior!