csh history search
sascha.folie at safo.at
Mon Oct 24 18:10:59 UTC 2016
On Mon, 24 Oct 2016 11:52:00 -0400
Anton Yuzhaninov <citrin+bsd at citrin.ru> wrote:
> On 10/24/16 11:39, Ernie Luzar wrote:
> > Lets say that a while back I issued this command
> > ping -c 4 hometown.jones.domain.com
> > Now I would like to retrieve that domain name from the history list.
> > On the command line I enter !?jon
> > The complete ping command is retrieved and automatically executed.
> > I don't want the found command automatically executed, I just want the
> > found command inserted to the command line being visible so I can
> > manually modify it before choosing to execute it.
> If you have
> bindkey -k up history-search-backward
> bindkey -k down history-search-forward
> in ~/.cshrc (there by default in FreeBSD)
> your can type
> and then using up/down arrows list all history entries matched by *jon*
> and edit lime before executing.
> man tcsh
> for more info.
You can also add
bindkey "^R" i-search-back
to ~/.cshrc to enable CTRL+r search (like bash).
More information about the freebsd-questions