Enhancing the user experience with tcsh

Anton Shterenlikht mexas at bristol.ac.uk
Fri Feb 10 14:43:48 UTC 2012


On Fri, Feb 10, 2012 at 09:03:52AM -0500, Eitan Adler wrote:
> Picking a random person to reply to.
> 
> There are a lot of good suggestions in this thread, but can we please
> remember a few things:
> 
> - Users can always add their own ~/.cshrc
> - Many users will get annoyed by what is someone else's amazing setup
> 
> The changes I proposed were designed to add value while continuing to
> be non-annoying to the vast majority of users. I'd like feedback about
> the specific patch I proposed. We can also create a wiki page for
> more awesome tcsh examples.
> 
> For the record this is the current version of the patch I'd like to
> commit: Note that it slightly changed from the original (I removed the
> duplicate prompt setup and reorganized where the edits are made to
> make the diff look nicer).
> 
> commit 3ea4ea3a59d14cb060244618dd89d7dd0170bee1
> 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,15 +18,19 @@ 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
> 
>  if ($?prompt) then
>  	# An interactive shell -- set some stuff up
> -	set prompt = "`/bin/hostname -s`# "
> +	set prompt = "[%n@%m]%c04%# "
> +	set promptchars = "%#"
>  	set filec
> -	set history = 100
> -	set savehist = 100
> +	set history = 10000
> +	set savehist = 10000
> +	set autolist
> +	# Use history to aid expansion
> +	set autoexpand
>  	set mail = (/var/mail/$USER)
>  	if ( $?tcsh ) then
>  		bindkey "^W" backward-delete-word

yes to the history improvements
no to the prompt changes
don't care for aliases - I never use these particular ones.

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423


More information about the freebsd-current mailing list