49
edits
| Line 13: | Line 13: | ||
An 'alias' acts like a custom command. It runs the assigned text as a script, which can contain a single-word command, statement, or script. Is used to create a custom command in the current context. | An 'alias' acts like a custom command. It runs the assigned text as a script, which can contain a single-word command, statement, or script. Is used to create a custom command in the current context. | ||
Aliases do not take 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". | Aliases do not take 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". In this case the second parameter will be ignored. | ||
Thus, aliases act like simple static macros. But when run they can do anything a script run by any other means could do, in the same context. And because aliases are treated like commands, they can have direct key bindings. | Thus, aliases act like simple static macros. But when run they can do anything a script run by any other means could do, in the same context. And because aliases are treated like commands, they can have direct key bindings. | ||