From 781e76855e13890c1bc64515340e38ec4041c93f Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 15 Apr 2016 10:20:44 +0200 Subject: zsh: rtab fix when sourcing zshrc from !home --- zsh/.zshrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 0c9a3d6..4120382 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -106,16 +106,20 @@ case `hostname` in ;; esac -psvar[1]="~" function chpwd { if [[ -e $ZDIR/functions ]] { source ~/.zsh/functions/rtab.zsh - psvar[1]=$(rtab) + if [[ $(pwd) == $HOME ]]; then + psvar[1]=$(print -P %~) + else + psvar[1]=$(rtab) + fi } else { psvar[1]=$(print -P %~) } } +chpwd zstyle ':prompt:rtab' fish yes zstyle ':prompt:rtab' nameddirs yes -- cgit v1.2.3