Engine:CCMD alias: Difference between revisions

Line 12: Line 12:
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". The second parameter will be ignored.
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". 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. And because aliases are treated like commands, they can have key and bindings like any command.
Thus, aliases act like simple static macros. But when run they can do anything a script run by any other means could do. And because aliases are treated like commands, they can have direct key bindings.


== Examples ==
== Examples ==