SH="${0#\-}"
if [ "$SH" = "sh" ]; then
- if [ ! -n KSH_VERSION ]; then
+ if [ -n "$KSH_VERSION" ]; then
SH=ksh
- elif [ ! -n BASH_VERSION ]; then
+ elif [ -n "$BASH_VERSION" ]; then
SH=bash
fi
fi
case "$SH" in
bash)
- PS1="\u@\h \W\\$ "
+ PS1="[\u@\h \W]\\$ "
;;
ksh|pdksh)
- PS1='[${LOGNAME-$USER}@${HOSTNAME}`
- if [ "$PWD" = "${PWD##$HOME}" ]; then
+ PS1='[${LOGNAME-$USER}@${HOSTNAME} `
+ if [ "$PWD" = "/${PWD##*/}" ]; then
echo $PWD;
else
- echo '~'${PWD##$HOME};
- fi`] '$PS1
+ echo ${PWD##*/};
+ fi`]'$PS1
PS2='> '
set -o emacs
bind '^I'=complete
+ bind '^[^I'=complete-list
#
# Setup some of the most basic editing functions
# to work properly under different termnal emulators.
esac
;;
zsh)
- PS1="%m:%~%# "
+ PS1="[%m:%~%]# "
;;
esac