Skip to content

Commit

Permalink
More tcsh prompt kajiggering
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Oct 17, 2012
1 parent 67f5f16 commit d7fdff7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .cshrc
Expand Up @@ -84,15 +84,18 @@ if ( $?tcsh ) then
set prompt = "%{\e[${usercolor}m%}%n%{\e[00m%}@%{\e[${hostcolor}m%}%m%{\e[00m%}:%{\e[01;34m%}%~%{\e[00m%}%# "

switch ($TERM)

case screen*:
if ( $?STY || $?TMUX ) then
alias precmd 'printf "\033]1;'"i${ttyat}${HOST}"'\a\033]2;'"${USER}@${HOST}"':%s'"${ttybracket}"'\a\033k'"${ttyat}"'\033\\" "`echo $cwd|sed -e s,^$HOME,~,`"'
set prompt = "%{\ek%l\e\\%}$prompt"
else
alias precmd 'printf "\033]1;'"i${ttyat}${HOST}"'\a\033]2;'"${USER}@${HOST}"':%s'"${ttybracket}"'\a\033k'"${ttyat}${HOST}"'\033\\" "`echo $cwd|sed -e s,^$HOME,~,`"'
set prompt = "%{\ek%l%m\e\\%}$prompt"
endif
breaksw
endsw

switch ($TERM)

case screen*:
case xterm*:
case rxvt*:
case Eterm*:
Expand All @@ -101,7 +104,7 @@ if ( $?tcsh ) then
case dtterm*:
case ansi*:
case cygwin*:
alias precmd 'printf "\033]1;'"${ttyat}${HOST}"'\a\033]2;'"${USER}@${HOST}"':%s'"${ttybracket}"'\a" "`echo $cwd|sed -e s,^$HOME,~,`"'
set prompt = "%{\e]1;${ttyat}%m\a\e]2;%n@%m:%~${ttybracket}\a%}$prompt"
breaksw

case linux*:
Expand Down

0 comments on commit d7fdff7

Please sign in to comment.