File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,19 @@ if [[ -n "$ZSH_VERSION" ]]; then
10
10
0=" ${ZERO:- ${${0:# $ZSH_ARGZERO } :- ${(% ):-% N} } } "
11
11
# shellcheck disable=2277,2296,2298
12
12
0=" ${${(M)0:#/* } :- $PWD / $0 } "
13
- INSTALL_DIR =" ${0: h} "
13
+ FORGIT_INSTALL_DIR =" ${0: h} "
14
14
elif [[ -n " $BASH_VERSION " ]]; then
15
- INSTALL_DIR =" $( dirname -- " ${BASH_SOURCE[0]} " ) "
15
+ FORGIT_INSTALL_DIR =" $( dirname -- " ${BASH_SOURCE[0]} " ) "
16
16
else
17
17
forgit::error " Only zsh and bash are supported"
18
18
fi
19
- FORGIT=" $INSTALL_DIR /bin/git-forgit"
19
+
20
+ export FORGIT_INSTALL_DIR
21
+ FORGIT=" $FORGIT_INSTALL_DIR /bin/git-forgit"
20
22
21
23
# backwards compatibility:
22
24
# export all user-defined FORGIT variables to make them available in git-forgit
23
- unexported_vars=0
25
+ local unexported_vars=0
24
26
# Set posix mode in bash to only get variables, see #256.
25
27
[[ -n " $BASH_VERSION " ]] && set -o posix
26
28
set | awk -F ' =' ' { print $1 }' | grep FORGIT_ | while read -r var; do
@@ -130,8 +132,6 @@ forgit::ignore::clean() {
130
132
" $FORGIT " ignore_clean " $@ "
131
133
}
132
134
133
- export FORGIT_INSTALL_DIR=$INSTALL_DIR
134
-
135
135
# register aliases
136
136
# shellcheck disable=SC2139
137
137
if [[ -z " $FORGIT_NO_ALIASES " ]]; then
You can’t perform that action at this time.
0 commit comments