Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 14:12:01 -0500
From:      parv <parv_@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Shell prompt contest
Message-ID:  <20020102191201.GA48648@moo.holy.cow>
In-Reply-To: <20020102170833.C49613@ns2.wananchi.com>
References:  <20020102150618.04ae22ff.johann@broadpark.no> <20020102170833.C49613@ns2.wananchi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
from my .bashrc...


tty=`tty`
tty=${tty##*/tty}

partial_ps1="\u_${tty}"

PS1="*- $partial_ps1 \W \! "
export PS1

if [ ${TERM:0:5} == "xterm" -o ${TERM:0:4} == "rxvt" ]; then

  TERM=xterm-color
  export TERM

  PS1="\n__ $partial_ps1 (\d \@) j_\j \w\n^^ \! "
  export PS1

  PROMPT_COMMAND='echo -ne "\E]0;${USER} (${tty}) ${PWD}\a"'
fi


...and from .kshrc...

tty=`tty`
tty=${tty##*/tty}

partial_ps1="${LOGNAME}_${tty}"

PS1="*- $partial_ps1 "'${PWD##*/:-/} ! '
export PS1

if [ ${TERM:0:5} = "xterm" -o ${TERM:0:4} == "rxvt" ]; then
  TERM=xterm-color
  export TERM

  PS1="
__ $partial_ps1 "'${PWD}'"
^^ ! "
  export PS1

  print -n "\\033]2;${USER} -${tty}-\\007"
fi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020102191201.GA48648>