Tweaking Linux Library Settings Within Readline

By Juliet Kemp (Send Email)
Posted Feb 8, 2010


Readline is the library that handles your Linux command-line input (and input for some other applications). The various customizable options for it are set either system-wide in /etc/inputrc or per-user in ~/.inputrc. Most of the time the default settings will work perfectly well, but there are a few you may wish to try out that will make slight changes to the way that tab-completion behaves.

Tip of the Trade: Readline is the library that handles Linux command-line input as well as input for applications. Most of the default settings work perfectly well, but some change the way tab-completion behaves and thus require modification.

Be sure to hit Ctrl-X, Ctrl-R after editing the file to re-read it and use the changes you've made.

  • Set completion-ignore-case on
    ignores the case of the input line when tab-completing. Typing let followed by tab will display the match Letter.txt as well as the match letter.txt. (It is turned off by default.)
  • Set show-all-if-ambiguous on
    shows all completion possibilities immediately instead of waiting for tab to be hit for a second time. As I am quite impatient, I like this one a lot. (It, too, is turned off by default.)
  • Set visible-stats on
    shows the type of each file when tab-completing. This will append * to executable files and / to directories. (Again, it too, is turned off by default.)
  • Set mark-directories on
    and
    set mark-symlinked-directories on
    control the way that directory names are displayed once they are completed. The first value adds a forward slash at the end of regular directory names when they're auto-completed, and the second does the same for symlinked directories. (The first one is turned on by default; the second is turned off by default.)
  • set completion-query-items VALUE
    sets the value beyond which you will be asked if you wish to see all the possible completions. To turn this off altogether, set it to zero. (This is set to 100 by default.)

Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of "Linux System Administration Recipes: A Problem-Solution Approach" (Apress, 2009).

Follow ServerWatch on Twitter

Page 1 of 1


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.