Engine:CCMD alias: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{dev/uiccmd}} Creates a new alias in the current context, replacing existing alias if any. <kua>alias bob fred</kua> == Arguments == * name - name for the new alias * value - script string or command to set as alias == Details == Used to give alternate name to commands or create custom commands in the current context. == Examples == === Default values === * 'bob' called without a value. No command, variable or alias named 'bob' exist. <kua> > bob Unknown: bob </kua>...") |
|||
| Line 21: | Line 21: | ||
> alias bob "echo fred" | > alias bob "echo fred" | ||
</kua> | </kua> | ||
* Same as the first example, but now alias 'bob' exists. The 'echo' command in the 'bob' alias script runs and prints 'fred'. | * Same as the first example, but now alias 'bob' exists. The 'echo' command in the 'bob' alias script runs, and prints 'fred'. | ||
<kua> | <kua> | ||
> bob | > bob | ||
Revision as of 20:50, 14 October 2023
Creates a new alias in the current context, replacing existing alias if any.
alias bob fred
Arguments
- name - name for the new alias
- value - script string or command to set as alias
Details
Used to give alternate name to commands or create custom commands in the current context.
Examples
Default values
- 'bob' called without a value. No command, variable or alias named 'bob' exist.
> bob Unknown: bob
- Creates an alias 'bob' and sets to 'echo fred'.
> alias bob "echo fred"
- Same as the first example, but now alias 'bob' exists. The 'echo' command in the 'bob' alias script runs, and prints 'fred'.
> bob fred
Notes
- If variable already exists, will not trigger any associated events when attempting to set.