Date: Mon, 25 Feb 2002 17:33:32 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Len Conrad <LConrad@Go2France.com> Cc: freebsd-questions@freebsd.org Subject: Re: shell behavior Message-ID: <20020225153332.GC3159@hades.hell.gr> In-Reply-To: <5.1.0.14.2.20020225063530.02f31900@mail.Go2France.com> References: <5.1.0.14.2.20020225063530.02f31900@mail.Go2France.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-02-25 06:40, Len Conrad wrote: > One behavior I prefer is <letter> up arrow will select the commands from > history beginning with <letter>. > > On some FreeBSD machines I use, this is standard, and on others, the select > is not done, one just gets the non-selected history. > > I've been looking at the .shrc and .cshrc files for $USER and /root, but I > cannot find out what parameter specifies this behavior. I believe what you're looking for are the ``bindkey'' commands of the file /usr/src/etc/root/dot.cshrc shown below: # $FreeBSD: src/etc/root/dot.cshrc,v 1.28 2001/01/10 02:37:16 archie Exp $ # # .cshrc - csh resource script, read at beginning of execution by each shell # ... if ($?prompt) then # An interactive shell -- set some stuff up set prompt = "`hostname -s`# " set filec set history = 100 set savehist = 100 set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif endif The ``bindkey -k up'' and ``bindkey -k down'' commands are tcsh-specific, that's why they're wrapper in an `if (?tcsh ) then .. endif' block. Note though, that you can't use these in older versions of FreeBSD where the system /bin/csh was not tcsh. Giorgos Keramidas FreeBSD Documentation Project keramida@{freebsd.org,ceid.upatras.gr} http://www.FreeBSD.org/docproj/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020225153332.GC3159>