File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ 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
@@ -35,6 +37,7 @@ set | awk -F '=' '{ print $1 }' | grep FORGIT_ | while read -r var; do
35
37
export " $var "
36
38
fi
37
39
done
40
+ unset unexported_vars
38
41
[[ -n " $BASH_VERSION " ]] && set +o posix
39
42
40
43
# register shell functions
@@ -130,8 +133,6 @@ forgit::ignore::clean() {
130
133
" $FORGIT " ignore_clean " $@ "
131
134
}
132
135
133
- export FORGIT_INSTALL_DIR=$INSTALL_DIR
134
-
135
136
# register aliases
136
137
# shellcheck disable=SC2139
137
138
if [[ -z " $FORGIT_NO_ALIASES " ]]; then
You can’t perform that action at this time.
0 commit comments