diff --git a/functions/c_fisher.fish b/functions/c_fisher.fish index 10a9935..40c02b0 100644 --- a/functions/c_fisher.fish +++ b/functions/c_fisher.fish @@ -13,8 +13,6 @@ function check_fisher # Define plugins to use with fisher set plugins "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish" - # Define dependencies for the plugins used by fisher - set dependencies "fzf" # Loop for plugin installation/update for plugin in $plugins @@ -27,17 +25,4 @@ function check_fisher end end - # Check and install dependencies - for dep in $dependencies - if not command -v $dep >/dev/null 2>&1 - echo "Dependency $dep is not installed. Installing..." - if test -n "$FISH_INSTALL" - upin - $install $dep - else - echo "FISH_INSTALL is not defined ' $FISH_INSTALL '. Please install $dep manually." - end - end - end end - diff --git a/functions/dep_fisher.fish b/functions/dep_fisher.fish new file mode 100644 index 0000000..4694e2e --- /dev/null +++ b/functions/dep_fisher.fish @@ -0,0 +1,17 @@ +function dep_fisher + # Define dependencies for the plugins used by fisher + set dependencies "fzf" + + # Check and install dependencies + for dep in $dependencies + if not command -v $dep >/dev/null 2>&1 + echo "Dependency $dep is not installed. Installing..." + if test -n "$FISH_INSTALL" + upin + $FISH_INSTALL $dep + else + echo "FISH_INSTALL is not defined ' $FISH_INSTALL '. Please install $dep manually." + end + end + end +end