Skip to content

Commit

Permalink
Fish: assume forgit in vendor_conf.d in case it can not be found in c…
Browse files Browse the repository at this point in the history
…onf.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
  • Loading branch information
sandr01d committed Jan 10, 2023
1 parent ffda73b commit 92ce300
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conf.d/forgit.plugin.fish
Expand Up @@ -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;
Expand Down

0 comments on commit 92ce300

Please sign in to comment.