Restore support for appending FORGIT_INSTALL_DIR to path (#308)

It seems somewhere along the line FORGIT_INSTALL_DIR stopped getting exported. According to the README you can append it to your path to get access to git forgit ... commands however this seems to no longer work - this is an attempt to restore this functionality.
This commit is contained in:
Tom 2023-05-16 16:45:52 +01:00 committed by GitHub
parent f73ae9754e
commit 99cda3248c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1,9 +1,11 @@
# MIT (c) Chris Apple
set INSTALL_DIR (dirname (dirname (status -f)))
set FORGIT "$INSTALL_DIR/conf.d/bin/git-forgit"
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/conf.d"
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
if [ ! -e "$FORGIT" ]
set FORGIT "$INSTALL_DIR/vendor_conf.d/bin/git-forgit"
set -x FORGIT_INSTALL_DIR "$INSTALL_DIR/vendor_conf.d"
set -x FORGIT "$FORGIT_INSTALL_DIR/bin/git-forgit"
end
function forgit::warn

View file

@ -130,6 +130,8 @@ forgit::ignore::clean() {
"$FORGIT" ignore_clean "$@"
}
export FORGIT_INSTALL_DIR=$INSTALL_DIR
# register aliases
# shellcheck disable=SC2139
if [[ -z "$FORGIT_NO_ALIASES" ]]; then