From 2100683d15c92a4d9f460d9606f304e9ae455363 Mon Sep 17 00:00:00 2001 From: PieckA Date: Sat, 25 May 2024 00:21:06 +0200 Subject: [PATCH] some changes --- config.fish | 75 +++++++++++++++++++++++------------------ functions/c_fisher.fish | 4 +-- 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/config.fish b/config.fish index 55f52c6..e255f83 100644 --- a/config.fish +++ b/config.fish @@ -29,49 +29,50 @@ end # ─────────────────────────< START | distro/packagemanger detection >───────────────────────── # ─< DNF - Fedora >───────────────────────────────────────────────────── if command -v dnf - alias install='$sudo dnf install' - alias update='$sudo dnf update && sudo dnf upgrade' - alias search='$sudo dnf search' - alias remove='$sudo dnf remove' + set install '$sudo dnf install' + set update '$sudo dnf update && sudo dnf upgrade' + set search '$sudo dnf search' + set remove '$sudo dnf remove' set -a ALIASSES "-- You're using DNF aliases!! --" end # ─< APT/NALA - Debian >──────────────────────────────────────────────── if command -v nala >/dev/null 2>&1 - alias install='$sudo nala update && sudo nala install' - alias update='$sudo nala update && sudo nala upgrade' - alias search='$sudo nala search' - alias remove='$sudo nala remove' + set install '$sudo nala update && sudo nala install' + set update '$sudo nala update && sudo nala upgrade' + set search '$sudo nala search' + set remove '$sudo nala remove' set ALIASSES "-- You're using NALA aliases!! --" else if command -v apt >/dev/null 2>&1 - alias install='$sudo apt update && sudo apt install' - alias update='$sudo apt update && sudo apt upgrade' - alias search='$sudo apt search' - alias remove='$sudo apt remove' + set install '$sudo apt update && sudo apt install' + set update '$sudo apt update && sudo apt upgrade' + set search '$sudo apt search' + set remove '$sudo apt remove' set ALIASSES "-- You're using APT aliases!! --" end end # ─< Pacman - Arch >──────────────────────────────────────────────────── if command -v yay >/dev/null 2>&1 - alias install='yay -S' - alias update='yay -Syu' - alias search='yay -Ss' - alias remove='yay -R' + set install 'yay -S' + set update 'yay -Syu' + set search 'yay -Ss' + set remove 'yay -R' set ALIASSES "-- You're using Arch!! - installed helper: yay --" else if command -v paru >/dev/null 2>&1 - alias install='paru -S' - alias update='paru -Syu' - alias search='paru -Ss' - alias remove='paru -R' + set install 'paru -S' + set update 'paru -Syu' + set search 'paru -Ss' + set remove 'paru -R' set ALIASSES "-- You're using Arch!! - installed helper: paru --" else if command -v pacman >/dev/null 2>&1 - alias install='$sudo pacman -S' - alias update='$sudo pacman -Syu' - alias remove='$sudo pacman -R' + set install '$sudo pacman -S' + set update '$sudo pacman -Syu' + set search '$sudo pacman -Ss' + set remove '$sudo pacman -R' set ALIASSES "-- by the PACMAN - You're using Arch!! --" end end @@ -79,27 +80,35 @@ end # ─< Zypper - OpenSuse >──────────────────────────────────────────────────────────────────── if command -v zypper >/dev/null 2>&1 - alias install='$sudo zypper in' - alias update='$sudo zypper dup' - alias search='$sudo zypper se' + set install '$sudo zypper in' + set update '$sudo zypper dup' + set search '$sudo zypper se' + set remove '$sudo zypper rm' alias lock='$sudo zypper al' - alias remove='$sudo zypper rm' set ALIASSES "-- I see.. you're using OpenSUSE. i like <3 -- -- ZYPPER -- " end # ─< APK - Alpine >───────────────────────────────────────────────────────────────────────── if command -v apk >/dev/null 2>&1 - alias install='$sudo apk add' - alias update='$sudo apk update' - alias search='$sudo apk search' + set install '$sudo apk add' + set update '$sudo apk update' + set search '$sudo apk search' set ALIASSES "-- Alpine.. right, this fast os is evolving.. --" end -# if [[ ! -e $HOME/.config/fish/functions/fisher.fish ]] - # check_fisher +# ─< set variables to aliasses >──────────────────────────────────────────────────────────── +set vars "install" "update" "search" "remove" +for c_alias in $vars +if not test -z "$" +alias "$vars"="$$vars" +end +end + +# if [[ ! -f $HOME/.config/fish/functions/fisher.fish ]] + check_fisher # else -# plugins_fisher + # plugins_fisher # end # ──────────────────────────< END | distro/packagemanger detection >────────────────────────── diff --git a/functions/c_fisher.fish b/functions/c_fisher.fish index 42a5f30..bb4fdf7 100644 --- a/functions/c_fisher.fish +++ b/functions/c_fisher.fish @@ -17,7 +17,5 @@ set plugin "PatrickF1/fzf.fish" "jorgebucaran/autopair.fish" end end - -function plugins_fisher -end +check_fisher