Fish: assume forgit in vendor_conf.d in case it can not be found in conf.d (#272)

In the fish wrapper, assume forgit-git to be in vendor_conf.d/bin in case it can not be found in conf.d/bin. This fixes forgit not working with fish when located in /usr/share/fish/vendor_conf.d, as is the case with the forgit and forgit-git AUR packages. The location at conf.d is kept (and stays the default), so forgit does not break compatibility with fish plugin managers, such as fisher.

Closes #270
This commit is contained in:
sandr01d 2023-01-10 20:41:32 +01:00 committed by GitHub
parent ffda73bac3
commit 92ce3007c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,9 @@
set INSTALL_DIR (dirname (dirname (status -f)))
set FORGIT "$INSTALL_DIR/conf.d/bin/git-forgit"
if [ ! -e "$FORGIT" ]
set FORGIT "$INSTALL_DIR/vendor_conf.d/bin/git-forgit"
end
function forgit::warn
printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$argv" >&2;