prompt attention
Set terminal title to
user@host:directory. Set prompt to same. root's PS1 adds a highlight of the username. Execution is conditional on terminal type to prevent borkage.
# Following sets prompt to [userid@host dir], and puts the full
# user@host:/full/path/spec in an xterm title bar.
function proml
{
case $TERM in
xterm*|rxvt|eterm|wterm*)
local TITLEBAR='\\[\\033]0;\\u@\\h:\\w\\007\\]'
# eval `dircolors /etc/dir_colors`
;;
*)
local TITLEBAR=''
;;
esac
case $TERM in
linux|xterm*|rxvt|[Ee]term|wterm|screen*)
alias ls='ls --color=auto'
;;
*) ;;
esac
# shell prompt
PS1="${TITLEBAR}\\
[\\u@\\h:\\W]\\
\\$ "
PS2='> '
PS4='+ '
}
if [ ! -z $PS1 ]; then
proml
export PS1
fi
--
Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]
[link|http://kmself.home.netcom.com/|[link|http://kmself.home.netcom.com/|http://kmself.home.netcom.com/]]
What part of "gestalt" don't you understand?
Keep software free. Oppose the CBDTPA. Kill S.2048 dead.
[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|[link|http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html|http://www.eff.org/...a_alert.html]]