X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/8ce1ca175d6bd1e6297346140884357cb51d0625..6698a8a0d2da74a08c95a2c5289e9e2e771efdee:/.zsh/func/vcsh diff --git a/.zsh/func/vcsh b/.zsh/func/vcsh index e404efc..ca26a9e 100755 --- a/.zsh/func/vcsh +++ b/.zsh/func/vcsh @@ -31,7 +31,11 @@ if [ ! -d "$FGIT_BASE/${1}.git" ]; then return 2 fi -export GIT_DIR=$FGIT_BASE/${1}.git +export GIT_DIR="$FGIT_BASE/${1}.git" +_WORKTREE="$(git config --get core.worktree)" +export GIT_WORK_TREE="$(readlink -f $GIT_DIR/$_WORKTREE)" +unset _WORKTREE + git status PS1="%S{VCSH:$1}%s$PS1" $SHELL -i