How to change completion coloring when auto-completing subcommands in bash?
For unknown reason, it looks like the completion results are treated by bash as broken symlinks. And it looks really disturbing.
System info:
- Bash version: 4.4.23(1)-release
- OS: Manjaro Linux
Edit: I understand that by setting off the colored-stats
GNU Readline option in ~/.inputrc
the coloring will be turned off altogether:
set colored-stats off
But that would also disable other coloring, such as for directory, when auto-completing.
I think this is weird because the broken-symlink-like coloring happens on my Manjaro Linux box at home, but not my Arch Linux box at work. Both are applied with the same bashrc
and inputrc
. But I didn't check for other potential difference for now.
Edit again: Pasting my ~/.inputrc
for reference:
$include /etc/inputrc
$if mode=emacs
# cycle through possible completions
TAB: menu-complete
# complete until the end of common prefix before cycling through possible completions
set menu-complete-display-prefix on
# show possible completions if more than one completions are possible
set show-all-if-ambiguous on
set show-all-if-unmodified on
# do not duplicate characters after the cursor if they consist partially of possbile completion
set skip-completed-text on
# display colors when doing completion as `ls` does
set colored-stats on
# color tab-completion matched prefix part
set colored-completion-prefix on
# fuck off stty key bindings. (stty -a)
set bind-tty-special-chars off
"\C-w": unix-word-rubout
"\eh": kill-region
"\eH": copy-region-as-kill
"\C-x\'": "\'\'\C-b"
"\C-x`": "``\C-b"
"\C-x\"": "\"\"\C-b"
"\C-x{": "{}\C-b"
"\C-x[": "[]\C-b"
"\C-x(": "()\C-b"
"\C-x0": vi-eWord
"\eF": "\C-x0\C-f"
"\eB": vi-bWord
"\eD": "\e \eF\eh"
$endif