[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Tip: Search Command Line Commands w/First Letters And Tab



Siard [2015-01-10 18:31:19+01] wrote:

> Cindy-Sue Causey wrote:
>> [ $ abc<tab><tab> yields list of available commands starting with abc ]
>
> You may also find this one useful:
> $ !abc  --> last used command starting with abc is executed.

And maybe also put these lines in your ~/.inputrc file:

    set keymap emacs-meta
    p: history-search-backward
    n: history-search-forward

Now start new shell (or actually any program that uses Readline library)
and type "ls" (or something) in command line and then with keys Meta-p
and Meta-n you can browse all commands that start with those characters.
This assumes editing-mode "emacs" (which is the default). Meta key is
Esc and usually Alt too.

Attachment: signature.asc
Description: PGP signature


Reply to: