From d031a79117e32e8716bf31c02f568c765723555f Mon Sep 17 00:00:00 2001 From: eKa Date: Fri, 30 Aug 2019 08:34:37 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D0=BE=D1=82=D0=BA=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=B8=D0=BC=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D0=B2=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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