csh history search

Anton Yuzhaninov citrin+bsd at citrin.ru
Mon Oct 24 15:52:12 UTC 2016

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.

More information about the freebsd-questions mailing list