diff --git a/.bash_aliases b/.bash_aliases index eb5e622..6f50b37 100755 --- a/.bash_aliases +++ b/.bash_aliases @@ -18,16 +18,30 @@ case "$ID" in alias burn='sudo apt-get autoremove' ;; arch|archlinux) - # Install something bypassing the prompts - alias inst='sudo pacman -S --noconfirm' - # Do a basic update - alias update='sudo pacman -Syu --noconfirm' - # Upgrade everything - alias upgrade_all='sudo pacman -Syu --noconfirm && sudo pacman -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r' - # Search packages - alias pacs='pacman -Ss' - # Uninstall - alias burn='sudo pacman -Rns --noconfirm' + # Check if yay is installed + if command -v yay >/dev/null 2>&1; then + # Install something bypassing the prompts + alias inst='yay -S --noconfirm' + # Do a basic update + alias update='yay -Syu --noconfirm' + # Upgrade everything + alias upgrade_all='yay -Syu --noconfirm && yay -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r' + # Search packages + alias pacs='yay -Ss' + # Uninstall + alias burn='yay -Rns --noconfirm' + else + # Install something bypassing the prompts + alias inst='sudo pacman -S --noconfirm' + # Do a basic update + alias update='sudo pacman -Syu --noconfirm' + # Upgrade everything + alias upgrade_all='sudo pacman -Syu --noconfirm && sudo pacman -Rns $(pacman -Qdtq) --noconfirm && sudo paccache -r' + # Search packages + alias pacs='pacman -Ss' + # Uninstall + alias burn='sudo pacman -Rns --noconfirm' + fi ;; alpine) # Install something bypassing the prompts