zsh:alias: Manually expand aliases anywhere
When passing a full command as arguments to another (e.g. `sudo`), aliases are not expanded. Add the `$` alias that makes it possible to expand a following alias anywhere. This uses the feature that aliases ending in a space will trigger alias expansion on the next argument. See: https://unix.stackexchange.com/a/433849
This commit is contained in:
@@ -55,6 +55,9 @@ fi
|
||||
alias -g no1='>/dev/null'
|
||||
alias -g no2='2>/dev/null'
|
||||
alias -g noO='&>/dev/null'
|
||||
# Manually trigger alias expansion for the next word
|
||||
# Taken from https://unix.stackexchange.com/a/433849
|
||||
alias -g '$= '
|
||||
|
||||
# Git
|
||||
alias g='git'
|
||||
|
||||
Reference in New Issue
Block a user