some changes

This commit is contained in:
PieckA 2024-05-25 13:33:54 +02:00
parent db5bf928ac
commit 3501c522d7

View file

@ -6,30 +6,40 @@
# ╰───────────────────────────────────╯ # ╰───────────────────────────────────╯
function check_fisher function check_fisher
if test ! -e $HOME/.config/fish/functions/fisher.fish if test ! -e $HOME/.config/fish/functions/fisher.fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
else fisher install jorgebucaran/fisher
# ─< define plugins to use with fisher >──────────────────────────────────────────────────── end
set plugin "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish"
# ─< define dependencies for the plugins used by fisher >─────────────────────────────────── # Define plugins to use with fisher
set dependencies "fzf" set plugins "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish"
# ─< forloop for the plugin installation/update >─────────────────────────────────────────── # Define dependencies for the plugins used by fisher
for plug in $plugin set dependencies "fzf"
if fisher update $plug
echo "Updated $plug" # Loop for plugin installation/update
for plugin in $plugins
if fisher list | grep -q (basename $plugin)
fisher update $plugin
echo "Updated $plugin"
else else
fisher install $plug fisher install $plugin
echo "Installed $plug" echo "Installed $plugin"
end
end
for dep in $dependencies
if ! command -v $dep >/dev/null 2>&1
$FISH_INSTALL $dep
end end
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"
$FISH_INSTALL $dep
else
echo "FISH_INSTALL is not defined. Please install $dep manually."
end
end
end end
# ──────────────────────────────────────< function end >──────────────────────────────────────
end end
check_fisher