2,113
edits
Line 15: | Line 15: | ||
Aliases do not have any parameters and will run the command, statement, or script verbatim. If for example, an alias named 'bob' is set to 'echo', it will always run exactly 'echo' which will print nothing, even if you run 'bob "some text". Here the second parameter was ignored. | Aliases do not have any parameters and will run the command, statement, or script verbatim. If for example, an alias named 'bob' is set to 'echo', it will always run exactly 'echo' which will print nothing, even if you run 'bob "some text". Here the second parameter was ignored. | ||
Thus, aliases act like simple static macros. But when run they can do anything a script in the same context run by any other means could do. And because aliases are treated like commands, they can | Thus, aliases act like simple static macros. But when run they can do anything a script in the same context run by any other means could do. And because aliases are treated like commands, they can use the special key state associations. | ||
== Examples == | == Examples == |