35 lines
1.8 KiB
Fish
35 lines
1.8 KiB
Fish
# ╭───────────────────────────────────╮
|
|
# │ This file holds the content to │
|
|
# │ install and configure the plugins │
|
|
# │ used by fisher, and of course the │
|
|
# │ fisher itself │
|
|
# ╰───────────────────────────────────╯
|
|
|
|
function check_fisher
|
|
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
|
|
else
|
|
# ─< define plugins to use with fisher >────────────────────────────────────────────────────
|
|
set plugin "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish"
|
|
|
|
# ─< define dependencies for the plugins used by fisher >───────────────────────────────────
|
|
set dependencies "fzf"
|
|
|
|
# ─< forloop for the plugin installation/update >───────────────────────────────────────────
|
|
for plug in $plugin
|
|
if fisher update $plug
|
|
echo "Updated $plug"
|
|
else
|
|
fisher install $plug
|
|
echo "Installed $plug"
|
|
end
|
|
end
|
|
for dep in $dependencies
|
|
if ! command -v $dep >/dev/null 2>&1
|
|
$FISH_INSTALL $dep
|
|
end
|
|
end
|
|
|
|
end
|
|
# ──────────────────────────────────────< function end >──────────────────────────────────────
|
|
end
|