Bash


Aliases are simple string substitutions. The shell looks at the first word of a command and compares it against it's current list of aliases. Further, if the last character of an alias is a space, it looks at the next word as well. For example:

Aliases don't allow for control-flow, command line arguments, or additional trickery that makes the command line so useful. Additionally, the rules surrounding alias expansion are a bit tricky, enough so that the bash(1) manpage recommends "[t]o be safe, always put alias definitions on a separate line, and do not use alias in compound commands"

Alias (last edited 2005-11-21 22:28:50 by PeMac)