I found out that the Bash shell supports a type of autocompletion that is different from the "traditional" autocompletion, where all possibilities get listed on the following line.
With the "traditional" autocompletion, if I type ch
and then press the Tab
key, I get something like:
$ ch
chacl chgrp chmod chown chvt
But if I add the following line to my /etc/inputrc
(which remaps the Tab key to the built-in menu-complete
function):
Tab: menu-complete
then the behavior of the shell changes: the word to be completed is replaced "inline" with a single match from the list of possible completions, and if I press the Tab key again, the word gets replaced with the next match.
I found this useful, but I still wanted to keep the traditional autocompletion and have it bound to the key combination Ctrl + Tab
. So I added the following line to my /etc/inputrc
file, according to what the readline
library documentation suggests:
Ctrl-Tab: complete
However, adding this line only seems to make both Tab
and Ctrl-Tab
call the traditional complete
function.
Does anyone know what I am doing wrong?
Thanks in advance!
man readline
suggests that the abbreviation for "Control" isC
, notCtrl
. (Disclaimer: I haven't tested.)