|
|
endif | endif |
| |
## | ## |
## Set a correct shell prompt |
## Set a Gentoo-ish shell prompt that also changes the window |
|
## title if appropriate |
## | ## |
if ( -o /dev/$tty ) then |
if ( $?TERM ) then |
set prompt="%C2%# " |
switch ( $TERM ) |
else |
case xterm*: |
set prompt="%B%m%b %C2%# " |
case rxvt: |
|
case eterm: |
|
case screen: |
|
if ( `id -u` != 0 ) then |
|
set prompt = "%{\033]0;%m:%~\007%}%{\033[0;1;34m%}(%{\033[0;1;32m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%}) %{\033[0;1;32m%}%n%{\033[0;1;32m%}%%%{\033[0m%} " |
|
else |
|
set prompt = "%{\033]0;%# %m:%~\007%}%{\033[0;1;34m%}(%{\033[0;1;31m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%}) %{\033[0;1;31m%}%#%{\033[0m%} " |
|
endif |
|
breaksw |
|
default: |
|
if ( `id -u` != 0 ) then |
|
set prompt = "%{\033[0;1;34m%}(%{\033[0;1;32m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%}) %{\033[0;1;32m%}%n%{\033[0;1;32m%}%%%{\033[0m%} " |
|
else |
|
set prompt = "%{\033[0;1;34m%}(%{\033[0;1;31m%}%m%{\033[0m%}:%{\033[0;1;34m%}%c3%{\033[0;1;34m%}) %{\033[0;1;31m%}%#%{\033[0m%} " |
|
endif |
|
breaksw |
|
endsw |
endif | endif |
| |
## | ## |
|
|
# Show job completions when they're done | # Show job completions when they're done |
set notify | set notify |
| |
# Change the window title of X terminals |
|
if ( $?TERM ) then |
|
switch ( $TERM ) |
|
case xterm*: |
|
case rxvt: |
|
case eterm: |
|
alias cwdcmd 'echo -n "\033]0;${USER}@${HOST}: $cwd\007"' |
|
breaksw |
|
case screen: |
|
alias cwdcmd 'echo -n "\033_${USER}@${HOST}: $cwd\033\\"' |
|
breaksw |
|
default: |
|
alias cwdcmd 'echo "Directory: $cwd"' |
|
breaksw |
|
endsw |
|
cd . |
|
endif |
|
|
|
# Enable editing in EUC encoding for the languages where this make sense: | # Enable editing in EUC encoding for the languages where this make sense: |
# (From SuSE's csh.cshrc) | # (From SuSE's csh.cshrc) |
if ( ${?LANG} ) then | if ( ${?LANG} ) then |