From 92ce3007c02553663e5c4bef79ba4d1e4fa0b014 Mon Sep 17 00:00:00 2001 From: sandr01d <88739791+sandr01d@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:41:32 +0100 Subject: [PATCH] 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 --- conf.d/forgit.plugin.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index 3fda363..c97f930 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -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;