mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 07:31:42 +00:00
[#169] Move _git-dir out of git-info into git-dir
This commit is contained in:
16
modules/git/functions/git-dir
Normal file
16
modules/git/functions/git-dir
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Gets the path to the Git directory.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
local git_dir="${$(git rev-parse --git-dir):A}"
|
||||
|
||||
if [[ -n "$git_dir" ]]; then
|
||||
print "$git_dir"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
|
Reference in New Issue
Block a user