A long time ago, in an operating system far, far away I used a tool called PCED. It had one really nice feature: If I had typed a command like
copy a b
it saved it, just like bash does. But when I typed
copy
and pressed up-arrow, it would filter the history entries and show only those that started with "copy".
I'm already using autojump for the cd command. Is there something to provide this filter on using up-arrow to scroll through past commands?
On Mon, Nov 25, 2019, 15:31 SternData subscribed-lists@sterndata.com wrote:
A long time ago, in an operating system far, far away I used a tool called PCED. It had one really nice feature: If I had typed a command like
copy a b
it saved it, just like bash does. But when I typed
copy
and pressed up-arrow, it would filter the history entries and show only those that started with "copy".
I'm already using autojump for the cd command. Is there something to provide this filter on using up-arrow to scroll through past commands?
Yes: in bash, just start typing what you're looking for after ctrl-r. Ctrl-r is bound by default to incremental search backwards.
On 25.11.19 15:30, SternData wrote:
A long time ago, in an operating system far, far away I used a tool called PCED. It had one really nice feature: If I had typed a command like
copy a b
it saved it, just like bash does. But when I typed
copy
and pressed up-arrow, it would filter the history entries and show only those that started with "copy".
You can have the same behavior with page-up. This feature must be configured in /etc/inputrc:
# alternate mappings for "page up" and "page down" to search the history "\e[5~": history-search-backward "\e[6~": history-search-forward
which is (AFAIK) default in fedora.
Best regards Ulf
On 11/25/19 10:05 AM, Ulf Volmer wrote:
On 25.11.19 15:30, SternData wrote:
A long time ago, in an operating system far, far away I used a tool called PCED. It had one really nice feature: If I had typed a command like
copy a b
it saved it, just like bash does. But when I typed
copy
and pressed up-arrow, it would filter the history entries and show only those that started with "copy".
You can have the same behavior with page-up. This feature must be configured in /etc/inputrc:
# alternate mappings for "page up" and "page down" to search the history "\e[5~": history-search-backward "\e[6~": history-search-forward
which is (AFAIK) default in fedora.
Thank you!