I’m not sure if what I’m asking is possible, but what I would like bash to do on tab presses is this:
- On the first tab press, expand a common prefix (skip/beep and do nothing, I don’t really mind, if there isn’t one)
- On the second tab press, list out options
- Any subsequent tab presses cycle through these options
If any key other than tab is pressed throughout the process, then the next tab press will behave as step one.
I managed to get one and two with this:
bind “set show-all-if-unmodified on” bind ‘set menu-complete-display-prefix on’
And I managed to get one and three with this:
bind ‘set menu-complete-display-prefix on’ bind ‘TAB:menu-complete’
Combining all three options results in one and three, however.
How can I get the desired behaviour?