bugfixing

This commit is contained in:
PieckA 2024-05-25 20:13:42 +02:00
parent 3082796a0e
commit 8210201ae7

View file

@ -79,7 +79,7 @@ function upin
set remove "$pkg rm" set remove "$pkg rm"
alias lock="$pkg al" alias lock="$pkg al"
set ALIASSES "-- I see.. you're using OpenSUSE. i like <3 -- set ALIASSES "-- I see.. you're using OpenSUSE. i like <3 --
-- ZYPPER -- " -- ZYPPER -- "
end end
# ─< APK - Alpine >───────────────────────────────────────────────────────────────────────── # ─< APK - Alpine >─────────────────────────────────────────────────────────────────────────
@ -171,17 +171,20 @@ end
# │ FUNCTION: check fisher plugin dependencies │ # │ FUNCTION: check fisher plugin dependencies │
# ╰────────────────────────────────────────────╯ # ╰────────────────────────────────────────────╯
function dep_fisher function dep_fisher
# Define dependencies for the plugins used by fisher # ─< Define dependencies for the plugins used by fisher >───────────────────────────────────
set dependencies "fzf" begin
# Check and install dependencies set dependencies "fzf" "rg"
for dep in $dependencies alias rg="ripgrep"
if not command -v $dep >/dev/null 2>&1 # ─< Check and install dependencies >───────────────────────────────────────────────────────
echo "Dependency $dep is not installed. Installing..." for dep in $dependencies
if test -n "$FISH_INSTALL" if not command -v $dep >/dev/null 2>&1
alias fish_install="$FISH_INSTALL" echo "Dependency $dep is not installed. Installing..."
fish_install $dep if test -n "$FISH_INSTALL"
else alias fish_install="$FISH_INSTALL"
echo "FISH_INSTALL is not defined: $FISH_INSTALL | Please install $dep manually." fish_install $dep
else
echo "FISH_INSTALL is not defined: $FISH_INSTALL | Please install $dep manually."
end
end end
end end
end end
@ -191,32 +194,15 @@ end
# │ FUNCTION: check for fisher and install if not present │ # │ FUNCTION: check for fisher and install if not present │
# ╰───────────────────────────────────────────────────────╯ # ╰───────────────────────────────────────────────────────╯
function inst_fisher begin
fisher install jorgebucaran/fisher function check_fishr
end if test ! -e $HOME/.config/fish/functions/fisher.fish && test ! -e $HOME/.config/fish/.fishr.init
echo "you did it!!"> $HOME/.config/fish/.fishr.init && curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
function check_fisher
set check_fisher = "false"
while $check_fisher != "true"
echo "check_fisher == flase"
sleep 1
# if $check_fisher = "true"
fisher update >/dev/null 2>&1
switch $status
case 0
set -U check_fisher "true"
echo "check_fisher == true"
sleep 1
case '*'
if test ! -e $HOME/.config/fish/functions/fisher.fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish >> $HOME/.config/fish/functions/fisher.fish
inst_fisher
end
end
end end
end end
end
# ────────────────────────────────────< setup some stuff >──────────────────────────────────── # ────────────────────────────────────< setup some stuff >────────────────────────────────────
upin upin
dep_fisher dep_fisher
check_fisher check_fishr