= Shell Alias = <> ---- == Expansion == The first token of a command is tested for equality to any existing aliases. If it matches, that token is replaced with the literal content of the alias, including any control characters. After alias expansion succeeds, the first token is again tested for equality to any existing aliases. If it matches a ''new'' alias, that token is again replaced. On the other hand, an alias is not re-expanded even if it matches again. If an alias's value contains a trailing space character, the next token also undergoes alias expansion. Aliases are created and removed with the `alias` and `unalias` [[Shell/BuiltinCommands#Alias|builtins]]. It is important to quote the value of an alias. ---- == Usage == The repeated expansion properties of aliases enable a form of inheritance. Consider the following aliases: {{{ alias ls='ls -F' alias la='ls -A' alias ll='la -l' }}} In this environment, `ll` will execute as `ls -F -A -l`. ---- CategoryRicottone