Permalink
Browse files

Add hg root parsing to directory choice

  • Loading branch information...
Hamish Downer
Hamish Downer committed Dec 19, 2016
1 parent 14bd125 commit 75f51033266b057a6c3cc3481793d365e438e664
Showing with 5 additions and 0 deletions.
  1. +5 −0 zsh/foobacca.zsh-theme
View
@@ -15,6 +15,11 @@ function prompt_pwd {
local homerepo=${$(git rev-parse --show-toplevel)/#${HOME}/\~}
local repopartslen=${#${(s:/:)${homerepo}}}
fi
# find hg root directory
if [ -d .hg ] || hg root > /dev/null 2>&1; then
local homerepo=${$(hg root)/#${HOME}/\~}
local repopartslen=${#${(s:/:)${homerepo}}}
fi
# split the path into it's parts
parts=(${(s:/:)${${PWD}/#${HOME}/\~}})

0 comments on commit 75f5103

Please sign in to comment.