Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.