From 99cda3248c205ba3c4638c4e461afce01a2f8acb Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 16 May 2023 16:45:52 +0100 Subject: [PATCH] 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. --- conf.d/forgit.plugin.fish | 6 ++++-- forgit.plugin.zsh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index 5e931a4..b8ca8b0 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -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 diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index 42d26a5..fecc3ad 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -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