ble.sh icon indicating copy to clipboard operation
ble.sh copied to clipboard

Cannot limit to use basic colours

Open StavromulaBeta opened this issue 3 years ago • 5 comments

ble version: 0.4.0-devel3+793dfad Bash version: 5.2.0(1)-rc2 (x86_64-pc-linux-gnu)

I would like Ble.sh to only use the 16 basic terminal colours, since those are the colours of my preferred theme. However, setting the config option bleopt term_index_colors=0 as the documentation suggests does not change this, as (for example) file paths are still shown in colour #26.

StavromulaBeta avatar Sep 14 '22 19:09 StavromulaBeta

bleopt term_index_colors is used to tell ble.sh about the color support of the terminal that you use, so if you specify a value inconsistent with the actual color support of your terminal, the resulting behavior is not necessarily the one you expect. In fact, ble.sh combines several ways to detect the color support of the terminal, and if ble.sh detects the support for the indexed colors in another way, ble.sh still tries to use the indexed colors.

Maybe I can adjust the behavior so that bleopt term_index_colors overrides the other detection mechanisms.

akinomyoga avatar Sep 15 '22 04:09 akinomyoga

That makes sense. Maybe not have bleopt term_index_colors override but instead have that as the maximum number of colours to use(?)

StavromulaBeta avatar Sep 15 '22 09:09 StavromulaBeta

Thanks, I'm currently thinking of making term_index_colors=auto (or -1) default, with which the other detection is used, and letting it override the other detection only when term_index_colors is set to an integer value.

akinomyoga avatar Sep 15 '22 10:09 akinomyoga

Yes that seems like sensible behavior

StavromulaBeta avatar Sep 15 '22 10:09 StavromulaBeta

I have supported it in 7d238c0. Could you update ble.sh by running ble-update in a ble.sh session and see if it works as you expect? Thank you!

akinomyoga avatar Sep 16 '22 10:09 akinomyoga

Oops sorry only just got the notification for this. I updated it and it worked perfectly!! Thanks again!

StavromulaBeta avatar Sep 21 '22 08:09 StavromulaBeta

OK! Thank you for checking!

akinomyoga avatar Sep 21 '22 09:09 akinomyoga