rearranged options

This commit is contained in:
Bryan Joshua Pedini 2023-10-28 21:58:27 +02:00
parent 0df0a8dd6e
commit eeaee974bd

16
pman.sh
View File

@ -29,6 +29,13 @@ fi
# Evaluate the command arguments
if [ "$command_args" = "search" ]; then
command_args="-Ss"
elif [ "$command_args" = "provides" ]; then
command_args="-F"
elif [ "$command_args" = "install" ]; then
command_args="-S"
if [ "$command" = "pacman" ]; then
su_needed=true
fi
elif [ "$command_args" = "update" ]; then
command_args="-Sy"
if [ "$command" = "pacman" ]; then
@ -41,11 +48,6 @@ elif [ "$command_args" = "upgrade" ]; then
if [ "$command" = "pacman" ]; then
su_needed=true
fi
elif [ "$command_args" = "install" ]; then
command_args="-S"
if [ "$command" = "pacman" ]; then
su_needed=true
fi
elif [ "$command_args" = "remove" ]; then
command_args="-Rs"
if [ "$command" = "pacman" ]; then
@ -56,8 +58,6 @@ elif [ "$command_args" = "purge" ]; then
if [ "$command" = "pacman" ]; then
su_needed=true
fi
elif [ "$command_args" = "provides" ]; then
command_args="-F"
elif [ "$more_arguments" = "true" ]; then
echo "Invalid command: \"$command $command_args\""
echo
@ -67,11 +67,11 @@ elif [ "$more_arguments" = "true" ]; then
echo " (aur packages - all the normal operations except config are available)"
echo " aur (yay) - yay | same as \"yay\""
echo " search - pacman -Ss | search packages"
echo " provides - pacman -F | list packages that provide file"
echo " install - pacman -S | install packages"
echo " update - pacman -Sy | updates the repositories"
echo " upgradable - pacman -Qu | list available upgrades"
echo " upgrade - pacman -Syu | upgrades your system"
echo " provides - pacman -F | list packages that provide file"
echo " remove - pacman -Rs | remove packages & dependencies"
echo " purge - pacman -Rns | remove packages, dependencies & conf"
echo " config - /etc/pacman.conf | edits pacman configuration"