.zshrc
changeset 18 136028f70fa4
parent 10 0afd98c7dab2
equal deleted inserted replaced
4:ce2c832c4c38 5:d4423707cf83
    44         fi
    44         fi
    45         ;;
    45         ;;
    46 esac
    46 esac
    47 
    47 
    48 PROMPT=$'%{\e[35m%}%m%#%{\e[m%} '
    48 PROMPT=$'%{\e[35m%}%m%#%{\e[m%} '
    49 precmd() { RPROMPT="[$PWD]" }
       
    50 
    49 
    51 dirbase() { basename $PWD }
    50 HOST3=`hostname | cut -b 1-3`
    52 chpwd() { [ "x$TERM" = "xscreen" ] && echo -n "\ek`hostname | cut -b 1-3`:`dirbase`\e\\" }
    51 precmd() {
    53 
    52     local PWD2=${PWD/#$HOME/\~}
    54 chpwd
    53     local DTRUN=$PWD2:t
       
    54     local DBASE=${DTRUN:-/}
       
    55     RPROMPT="[$PWD2]"
       
    56     [ "x$TERM" = "xscreen" ] && echo -n "\ek$HOST3:$DBASE\e\\"
       
    57 }