mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
fix(git-ignore): use $XDG_CONFIG_HOME only when it is defined
This commit is contained in:
parent
d7b527c1ae
commit
458727bafb
|
|
@ -12,7 +12,9 @@ function show_contents {
|
|||
}
|
||||
|
||||
function global_ignore() {
|
||||
git config --global core.excludesfile || echo "$XDG_CONFIG_HOME/git/ignore" || echo "$HOME/.config/git/ignore"
|
||||
git config --global core.excludesile || \
|
||||
([ -n "$XDG_CONFIG_HOME" ] && echo "$XDG_CONFIG_HOME/git/ignore") || \
|
||||
echo "$HOME/.config/git/ignore"
|
||||
}
|
||||
|
||||
function show_global {
|
||||
|
|
|
|||
Loading…
Reference in a new issue