diff --git a/.zshrc b/.zshrc index 0fc5f69..0b21941 100644 --- a/.zshrc +++ b/.zshrc @@ -73,7 +73,15 @@ zle -N down-line-or-beginning-search #prompt redhat autoload -U colors && colors -PROMPT="%B%F{2}[%n@%m %~]%#%f%b " + +apos=`expr index "$USER" @` +if [[ $apos -ne '0' ]]; then + U=${USER:0:$apos} + PROMPT="%B%F{2}[$U%m %~]%#%f%b " +else + PROMPT="%B%F{2}[%n@%m %~]%#%f%b " +fi + #RPROMPT='%T' # Extract archives