4

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

2 Answers 2

4

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?

1
  • 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, 2012 at 8:16
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .