Reading Bash-4.4 Release Available, I noticed the following sentence.

There is a new bindable variable, `colored-completion-prefix', which, if set, causes the common prefix of a set of possible completions to be displayed in color.

I tried with export colored-completion-prefix=1 but I got an error message.

-bash: export: `colored-completion-prefix=1': not a valid identifier

I tried set -o colored-completion-prefix 1, but I got this error message.

-bash: set: colored-completion-prefix: invalid option name

shopt -s colored-completion-prefix gave me a similar error message.

-bash: shopt: colored-completion-prefix: invalid shell option name

What does bindable variable mean, in that page? How can I set that bindable variable?

The Bash version I am running is the following one, given from CTRL + X + V in a Bash window.

GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)


It's referring to a readline variable.

In your ~/.config/readline/inputrc file:

set colored-completion-prefix on

You may also want:

set colored-stats on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.