1

I know that one can enable colored autocomplete in Bash (e.g. by adding set colored-stats on to an inputrc file). This seems to always highlight based on the files reachable (e.g. directories are blue, images are red, etc.), but this is somewhat annoying in some cases.

For example, if I'm working in an Python shell and use tab to autocomplete some variable/function name, Bash will try to (incorrectly) highlight the output, usually resulting in a lot of ugly flashing red normally meaning the file is not found.

Is there any way around this? Maybe disabling the colored autocomplete while inside other shells?

1 Answer 1

1

inputrc (/etc/inputrc, ~/.inputrc) is a generic config for readline. It affects any tool that uses the readline library.

If you want set colored-stats on to only affect Bash, put

bind 'set colored-stats on' 2>/dev/null

in your ~/.bashrc. Do not put set colored-stats on in any inputrc.

(2>/dev/null because of this issue.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .