Very useful .cshrc file that will also work with the tcsh shell.

Posted: April 23, 2012. At: 8:48 AM. This was 6 years ago. Post ID: 3217
Page permalink:

Now, we must convince Congress to stop the FCC. Can you display an alert?

Very useful .cshrc file that will also work with the tcsh shell on Linux and UNIX. This gives you a nice prompt and a lovely colored ls output. This .cshrc file requires a .complete file for proper functioning, this is available here:

# /etc/csh.login: This file contains login defaults used by csh and tcsh.
# $Thanks 2>
# Set up some environment variables:
source ~/.complete
if ($?prompt) then
        umask 022
        set cdpath = ( /var/spool )
        set notify
        set history = 1000
        set savehist = 500
        setenv MINICOM "-c on"
        setenv HOSTNAME "`uname -n`"
        setenv LESS "-M"
        setenv LESSOPEN "| %s"
        setenv DOOMWADDIR "/usr/share/games/doom"
        set path = ( $path /usr/X11R6/bin /usr/games $HOME/bin /usr/local/games )
# If the user doesn't have a .inputrc, use the one in /etc.
if (! -r "$HOME/.inputrc") then
        setenv INPUTRC /etc/inputrc
# I had problems with the backspace key installed by 'tset', but you might want
# to try it anyway, instead to the 'setenv term.....' below it.
# eval `tset -sQ "$term"`
 setenv term linux
# if ! $?TERM setenv TERM linux
# Set to "linux" for unknown term type:
if ("$TERM" == "") setenv TERM linux
if ("$TERM" == "unknown") setenv TERM linux
# Set default POSIX locale:
setenv traditional_complete
alias cls 'clear'
alias ls 'ls -hula --color=auto'
alias tarunpack 'tar -xvf'
alias bz2unpack 'tar -jxvf'
# Set the default shell prompt:
set prompt = "\[%[email protected]$HOSTNAME\]:%~%# "
# Set up the LS_COLORS environment variable for color ls output:
eval `dircolors -c`
# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.login)
#biff y
# Append any additional csh scripts found in /etc/profile.d/:
[ -d /etc/profile.d ]
if ($status == 0) then
        set nonomatch
        foreach file ( /etc/profile.d/*.csh )
                [ -x $file ]
                if ($status == 0) then
                        source $file
        unset file nonomatch

I have edited this post to remove the set MANPATH environment variable as this was not working.

No comments have been made. Use this form to start the conversation :)

Leave a Reply