.inputrc TAB not behaving as expected

Readline doesn't know anything about a modifier called Shift, and quietly ignores unknown modifier names. Try wibble-TAB.

To bind an action to Shift+Tab, you need to find out what escape sequence your terminal sends. In bash, run cat and type Ctrl+V then Shift+Tab. This will insert the escape sequence literally. It's likely that the first character will be an escape character, shown as ^[; different terminals have different escape sequences, but common possibilities are ␛[Z (i.e. escape, left bracket, capital Z) and ␛␉ (i.e. escape, tab). Bind the key appropriately in ~/.inputrc (where \e means an escape character).

"\e\t": menu-complete-backward
"\e[Z": menu-complete-backward

On Xubuntu 16.04, terminal: xfce4-terminal 0.6.3, shell: bash

For Shift+Tab to work I had to use:

bind '"\e[Z": menu-complete-backward'

Tags:

Bash

Readline