- check if command is yay or nano (config), otherwise command is pacman - check if su is needed only for pacman and not yay - check command arguments after determining command (or empty, which is default, pacman)