Take the 2-minute tour ×

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)?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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?

share|improve this answer
Thanks for the link. Indeed, history-search-backward and history-search-forward are very useful. Especially when I forget to press Ctrl-R before entering the partial command. –  ML-- Feb 10 '12 at 8:16
add comment

Alt+Tab is a hot key in Windows and in several unix window managers. In these environments, this key combination does not filter down to applictions.

In a text terminal, Alt+key is usually translated to ESC followed by the corresponding key. (This can be overridden in some terminals' configuration, but usually isn't.) So you can type Esc Tab to invoke this command.

share|improve this answer
add comment

Your Answer


