I have colored-completion-prefix set on in my ~/.inputrc file, but when I tab complete, the prefix part which has already been typed is a colour that I do not like.

In the bash manual it says:

"colored-completion-prefix (Off) If set to On, when listing completions, readline displays the common prefix of the set of possible completions using a different color. The color definitions are taken from the value of the LS_COLORS environment variable."

It is currently brown and underlined due to my config, which doesn't look very good. Which entry in LS_COLORS does it use?

1 Answer 1


$LS_COLORS is usually defined in ~/.bashrc using the dircolors command and a dir_colors file.

I could not find any information on what entry is used by the colored-completion-prefix readline setting but by through the process of elimination I found that it uses SOCK.

I changed mine from:

SOCK 04;33


SOCK 01;38;5;64

...in my dir_colors file.

This will obviously also change the appearance of sockets when using the ls command.

You must log in to answer this question.

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