Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Bash has a great incremental history search with CTRL+R. However, using that is evidently tied to being in a bash. Ubuntu, on the other hand, has this nice global search tied to the Windows key (in GNOME3 at least), which generates incremental suggestions from all kinds of sources. So I wonder: Is there an extension of some kind which would integrate the Bash history search suggestions into the Ubuntu search suggestions?

So, regardless of the application context I am in, I would like to press the Windows key, get my standard Ubuntu search, but then have that search also include Bash history suggestions. (Which should, when selected, just open a terminal and then execute the selected command.)

share|improve this question
You try ALT+F2? –  amanthethy Jul 14 '14 at 8:09
As far as I can see, the dialog which you get for ALT+F2 provides no access to the bash history. –  Hans Jul 20 '14 at 18:10

1 Answer 1

How about this:

$history | less

then use "/" to search for things, just like you would in vim. if you wanted to get really special you could make an alias for that, or even a little script, and bind a keystroke to it.

press "q" to escape.

How to alias that:

$alias b='history | less'

so now you want to bind this to a key: you could use bind. This command binds our command that allows us to search to be bound the the key press of ALT+SHIFT+W

$bind -x '"\eW":"history | less"'
share|improve this answer
Thanks, but AFAICS your approach works in a terminal and with a specific key binding. In a terminal, I can already use CTRL+R to get a wonderful incremental history search. However, I would like to get this search tied in with the Ubuntu (Gnome) suggestions activated through the Windows key. –  Hans Mar 24 at 19:56
so you want Ctrl+R bound (assigned) to the super (windows)key? –  j0h Mar 24 at 20:33
I don't think so - I have edited the question to hopefully make it clearer. –  Hans Mar 25 at 12:29

Your Answer


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.