Command - line conclusion from command history

So, I've considered background and also at Ctrl+R, yet they are not what I assumed I recognized. Exists a manner in which I can key in the start of a command, and also cycle via the suits in my background with some bash faster way?

# mysq(some shortcut key)

Gives me:

# mysqldump  --add-drop-table -e -q -n -C -u 
(some shortcut key)
#  mysql -u ben.dauphinee -p
0
2019-05-13 05:00:20
Source Share
Answers: 2

Pressing Ctrl+R will certainly open the reverse background search. Currently start keying your command, this will certainly offer the first suit. By pushing Ctrl+R once more (and also once more) you can cycle via the background.

mysq(Ctrl+R)

Would offer:

mysqldump  --add-drop-table -e -q -n -C -u 

Ctrl+R once more:

mysql -u ben.dauphinee -p
0
2019-05-17 18:46:10
Source

You can make use of the readline regulates history-search-backward and also history-search-forward to browse in between commands lines starting with the prefix you've currently keyed in. Neither of these commands are bound to type in the default arrangement.

Zsh (zle) has comparable commands history-beginning-search-backward and also history-beginning-search-forward, additionally not bound to keys by default. There are additionally history-search-backward and also history-search-forward, which makes use of the first word of the existing command as the prefix to look no matter the arrow placement.

0
2019-05-17 18:32:53
Source