1 Command Alias
steve-px edited this page 2026-07-07 12:29:10 +00:00

🢐🢐 Index ‖ 🢐 Previous Page | Next Page 🢒


[-] Appendix A2 - Console Commands

Command: Alias

Syntax

ALIAS <String: AliasName> <String: CommandStack>

Description

The ALIAS command creates a custom command that can be used as a shortcut for one or more existing commands. Alias commands are a powerful way to combine multiple commands into a single reusable command.

The commands that make up the alias are specified in the CommandStack parameter. Multiple commands can be included by separating them with a semicolon (;).

Argument Replacement

Aliases support argument replacement, allowing values passed to the alias to be inserted into the command stack. Arguments are referenced using placeholders enclosed in percentage signs (%).

The following placeholders are supported:

  • %A1% - First argument
  • %A2% - Second argument
  • ...
  • %A10% - Tenth argument

The letter A stands for Argument. If a referenced argument is not provided, it is replaced with an empty string.

In addition to the numbered argument placeholders, you can use:

  • %A% - Replaced with all arguments passed to the alias.

Examples

> ALIAS count3 "echo 1; echo 2; echo 3"
> count3
1
2
3
> ALIAS echoarg "echo \"%A1%\""
> echoarg "Hello World"
Hello World

Frequently Asked Questions

1. Can I nest aliases?

Yes. You can do something as followed:

> alias a1 "echo \"1st alias\";
> alias a2 "echo \"Calling first alias...\"; a1"
> a2
Calling first alias...
1st alias

2. What happens with too many arguments (more than 10)

The alias command only supports up to 10 arguments.

3. Can aliases call other aliases

Yes. See first question.

🢐🢐 Index ‖ 🢐 Previous Page | Next Page 🢒