You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a core alias sudo to fix alias expansion when running a user alias via sudo: alias sudo='sudo '
Bash only checks the first word of a command for an alias, any words after that are not checked.
That means in a command like sudo pacman, only the first word (sudo) is checked by bash for an alias, pacman is ignored. This can be changed by adding a space to the end of the alias value so bash checks the next word after the alias.
The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias.
[...]
If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion
Add a core alias
sudo
to fix alias expansion when running a user alias viasudo
:alias sudo='sudo '
Bash only checks the first word of a command for an alias, any words after that are not checked.
That means in a command like
sudo pacman
, only the first word (sudo
) is checked by bash for an alias,pacman
is ignored. This can be changed by adding a space to the end of the alias value so bash checks the next word after the alias.Snippet of the official bash manual:
More information and this alias can also be found in the Arch Linux Wiki for sudo.
The text was updated successfully, but these errors were encountered: