Hi there
I wrote a little script, that you can add to your $HOME/.config/fish/config.fish
It is one unified command to install packages and update your system.
We don't like partial updates, so updating our system before we install something, is always important. In order to simplify that, I combined both steps, together with AUR interaction.
Use add firefox to install from pacman`s repositorys.
And when they dont work it automatically tries at the AUR.
You can also use add to update your system and do not install anything.
It simplifies the commands you have to remember.
The script does avoid to install a package, if your system fails to update.
It prevents you from all damage, including bad sitcoms.
HINT: The option --skip-mirrorlist makes the update go faster and has a drawback:
Rating the mirrors is done, in order to ensure that you sync with an up-to-date one.
Otherwise, you could put your system in a partially updated state.
Garuda, in its infinite glory, does warn you when such a thing happens, and I personally have not experienced this once, despite me using the mirror rating quite rarely.
You can choose on your own, if you want that option, or not.
I am open to all input, as long as its well intended.
Thanks to the maintainer of fish, who does a wonderful job
function add --wraps "pacman -S"
update --skip-mirrorlist &&
paru -Sua &&
echo \n "Update pkgfile database" \n &&
sudo pkgfile --update &&
if set -q argv[1]
sudo pacman -S $argv
if test $status -eq 1
paru -S --aur --skipreview $argv
end
end
end
And here is a command that intelligently searches for your packages.
If the package you are looking for, is installed on your device, it shows a detailed view of it.
If the package exists in either the AUR or the official package repositories, it shows that, in sensible order.
And if the given parameter does not match any of that, it looks if the input can be found IN a package. That is especially useful when packaging.
function search
pacman -Qi $argv
if test $status -eq 1
paru -Ss --aur $argv
pacman -Ss $argv
if test $status -eq 1
pkgfile -vri $argv
end
end
end