summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-04-15 10:20:44 +0200
committerPatrick Simianer <p@simianer.de>2016-04-15 10:20:44 +0200
commit781e76855e13890c1bc64515340e38ec4041c93f (patch)
tree73ddd679a1844147f9444a4633c5260eefa2962a /zsh
parent6ddbdf9712aaabc51915951beee38dc8249aa244 (diff)
zsh: rtab fix when sourcing zshrc from !home
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc8
1 files 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