some changes
This commit is contained in:
parent
db5bf928ac
commit
3501c522d7
1 changed files with 29 additions and 19 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue