From owner-freebsd-questions Mon Feb 25 9:18:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 5155237B404 for ; Mon, 25 Feb 2002 09:18:20 -0800 (PST) Received: from hades.hell.gr (patr530-a051.otenet.gr [212.205.215.51]) by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g1PHICkk001054; Mon, 25 Feb 2002 19:18:16 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id g1PFXXI25705; Mon, 25 Feb 2002 17:33:33 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Mon, 25 Feb 2002 17:33:32 +0200 From: Giorgos Keramidas To: Len Conrad Cc: freebsd-questions@freebsd.org Subject: Re: shell behavior Message-ID: <20020225153332.GC3159@hades.hell.gr> References: <5.1.0.14.2.20020225063530.02f31900@mail.Go2France.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20020225063530.02f31900@mail.Go2France.com> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-02-25 06:40, Len Conrad wrote: > One behavior I prefer is up arrow will select the commands from > history beginning with . > > 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