From owner-freebsd-current@FreeBSD.ORG Fri Feb 10 01:28:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A6010656A3 for ; Fri, 10 Feb 2012 01:28:45 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 9431D8FC12 for ; Fri, 10 Feb 2012 01:28:45 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 4E00A7E824; Fri, 10 Feb 2012 12:10:32 +1100 (EST) Message-ID: <4F346E88.2010302@freebsd.org> Date: Fri, 10 Feb 2012 12:10:32 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120126 Thunderbird/9.0 MIME-Version: 1.0 To: Eitan Adler References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: Chris Rees , freebsd-current Current , "Wojciech A. Koszek" , Colin Percival Subject: Re: Enhancing the user experience with tcsh X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 01:28:46 -0000 On 02/10/12 11:52, Eitan Adler wrote: > In conf/160689 (http://www.freebsd.org/cgi/query-pr.cgi?pr=160689) > there has been some discussion about changing the default cshrc file. > > I'd like to commit something like the following based on Chris's patch > at the end of the thread. This post is an attempt to open the change > to wider discussion. I like the proposed changes, although I don't see why you set the prompt twice? I've also inserted the changes I commonly run with inline below. > commit dbe6cb730686dd53af7d06cc9b69b60e6e55549c > diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc > --- a/etc/root/dot.cshrc > +++ b/etc/root/dot.cshrc > @@ -7,9 +7,10 @@ > > alias h history 25 > alias j jobs -l > -alias la ls -a > +alias la ls -aF > alias lf ls -FA > -alias ll ls -lA > +alias ll ls -lAF > +alias ls ls -F > > # A righteous umask > umask 22 > @@ -17,19 +18,24 @@ umask 22 > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin $HOME/bin) > > setenv EDITOR vi > -setenv PAGER more > +setenv PAGER less > setenv BLOCKSIZE K # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running if (${?SSH_AUTH_SOCK} != "1") then setenv SSH_AUTH_SOCK `sockstat | grep ${USER} | grep ssh-agent | awk '{print $6}'` endif > if ($?prompt) then > # An interactive shell -- set some stuff up > set prompt = "`/bin/hostname -s`# " # Useful for root's .cshrc, although I run with it in all my .cshrc if (`id -g` == 0) then set prompt="root@%m# " endif > set filec > - set history = 100 > - set savehist = 100 > + set history = 10000 > + set savehist = 10000 > + set autolist set autologout = 0 > + # Use history to aid expansion > + set autoexpand > 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 # This maps the "Delete" key to do the right thing # Pressing CTRL-v followed by the key of interest will print the shell's mapping for the key bindkey "^[[3~" delete-char-or-list-or-eof > endif > + set prompt = "[%n@%m]%c04%# " > + set promptchars = "%#" > endif > Cheers, Lawrence