#
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
- TERM=linux
+ TERM=linux
fi
SH="${0#\-}"
case "$SH" in
bash)
- case $TERM in
+ case $TERM in
xterm*)
PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
;;
esac
;;
ksh|pdksh)
- if [ `id -u` -eq 0 ]; then
+ if [ `id -u` -eq 0 ]; then
PS1='[${LOGNAME-$USER}@${HOSTNAME} `
- if [ "$PWD" = "/${PWD##*/}" ]; then
- echo $PWD;
- else
- echo ${PWD##*/};
+ if [ "$PWD" = "/${PWD##*/}" ]; then
+ echo $PWD;
+ else
+ echo ${PWD##*/};
fi`]# '
else
PS1='[${LOGNAME-$USER}@${HOSTNAME} `
- if [ "$PWD" = "/${PWD##*/}" ]; then
- echo $PWD;
- else
- echo ${PWD##*/};
+ if [ "$PWD" = "/${PWD##*/}" ]; then
+ echo $PWD;
+ else
+ echo ${PWD##*/};
fi`]$ '
fi
PS2='> '
esac
;;
ksh93)
- if [ `id -u` -eq 0 ]; then
+ if [ `id -u` -eq 0 ]; then
PS1='[${LOGNAME-$USER}@${HOSTNAME} `
- if [ "$PWD" = "/${PWD##*/}" ]; then
- echo $PWD;
- else
- echo ${PWD##*/};
+ if [ "$PWD" = "/${PWD##*/}" ]; then
+ echo $PWD;
+ else
+ echo ${PWD##*/};
fi`]# '
else
PS1='[${LOGNAME-$USER}@${HOSTNAME} `
- if [ "$PWD" = "/${PWD##*/}" ]; then
- echo $PWD;
- else
- echo ${PWD##*/};
+ if [ "$PWD" = "/${PWD##*/}" ]; then
+ echo $PWD;
+ else
+ echo ${PWD##*/};
fi`]$ '
fi
PS2='> '
set -o emacs
case $TERM in
nxterm|xterm|xterm-color)
- trap 'case ${.sh.edchar} in "\e[F") .sh.edchar="\ 5" ;; "\e[H") .sh.edchar="\ 1" ;; esac' KEYBD
+ trap 'case ${.sh.edchar} in "\e[F") .sh.edchar="\ 5" ;; "\e[H") .sh.edchar="\ 1" ;; esac' KEYBD
;;
linux|rxvt)
- trap 'case ${.sh.edchar} in "\e[4~") .sh.edchar="\ 5" ;; "\e[1~") .sh.edchar="\ 1" ;; esac' KEYBD
+ trap 'case ${.sh.edchar} in "\e[4~") .sh.edchar="\ 5" ;; "\e[1~") .sh.edchar="\ 1" ;; esac' KEYBD
;;
esac
;;
# other HISTFILE, zsh uses diffrent fmt
HISTFILE=~/.historyz
- # w/o this hist file wont get saved !
+ # w/o this hist file won't get saved!
SAVEHIST=$HISTSIZE
;;
esac