|
As a workaround you
can set the required environment variable by executing scripts for the various
shells.
bash shell:
Set the following in bashrc:
case $TERM in
xterm*)
PS1="\[\033]0;\u@\h: \w\007\]bash\\$ "
;;
*)
PS1="bash\\$ "
;;
esac
(or)
USER=`/usr/xpg4/bin/id -un`
export USER
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
ksh shell:
Add the following in the ~.profile
file:
mycd () {
cd "${@}"; echo "\033]0;${USER}@${HOSTNAME}: ${PWD}\007\c"
}
alias cd=mycd
csh shell:
Set the following
in cshrc:
switch ($TERM)
case "xterm*":
set host=`hostname`
alias cd 'cd \!*; echo -n "^[]0;${user}@${host}:
${cwd}^Gcsh% "'
breaksw
default:
set prompt='csh% '
breaksw
endsw
The '^[' and '^G' characters in the
prompt string are single characters for ESC and BEL. You can enter these characters
using Ctrl+v+ESC and Ctrl+v+g.
|