Ubuntu – alt-tab completion while using SSH

11.10auto-completionconsolessh

I just recently discovered that pressing alt-tab on a console window allows me to autocomplete from the last commands and parameters I used.
Very useful!

But when using SSH from Windows this feature is obviusly lost.

Is there a way to remap this function to another key(s)?

Best Answer

This is the action tied to readline's function dynamic-complete-history.

You can redefine such action in ~/.inputrc, for example to Alt-z with

$include /etc/inputrc
"\ez": dynamic-complete-history

where \e means ESC and is equivalent to an Alt modifier.

Also take into account this other possible solution: How to quickly store and access often used commands?

Related Question