Fixed vim and zsh
This commit is contained in:
9
zsh/modules/git/functions/git-root
Normal file
9
zsh/modules/git/functions/git-root
Normal file
@@ -0,0 +1,9 @@
|
||||
local root="$(command git rev-parse --show-toplevel 2> /dev/null)"
|
||||
|
||||
if [[ -n "${root}" ]]; then
|
||||
print "${root}"
|
||||
return 0
|
||||
else
|
||||
print "${0}: not a repository work tree: ${PWD}" >&2
|
||||
return 1
|
||||
fi
|
Reference in New Issue
Block a user