Help:Alias: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<html><pre | <html><pre> | ||
<span style="color:# | <span style="color:#cc00cc">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</span> | ||
<span style="color:# | <span style="color:#008888"> ALIAS SYSTEM</span> | ||
<span style="color:# | <span style="color:#cc00cc">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</span> | ||
<span style="color:# | <span style="color:#008888">SYNTAX:</span> | ||
<span style="color:# | <span style="color:#008800">alias</span> - List all your aliases | ||
<span style="color:# | <span style="color:#008800">alias <name></span> - Show what an alias does | ||
<span style="color:# | <span style="color:#008800">alias <name> <command></span> - Create a new alias | ||
<span style="color:# | <span style="color:#008800">ralias <name></span> - Remove an alias | ||
<span style="color:# | <span style="color:#008888">DESCRIPTION:</span> | ||
Aliases allow you to create shortcuts for commonly used commands. | Aliases allow you to create shortcuts for commonly used commands. | ||
You can have up to 50 aliases, each up to 20 characters long. | You can have up to 50 aliases, each up to 20 characters long. | ||
<span style="color:# | <span style="color:#008888">EXAMPLES:</span> | ||
<span style="color:# | <span style="color:#008800">alias n north</span> - Make 'n' move you north | ||
<span style="color:# | <span style="color:#008800">alias hw say hello world</span> - Make 'hw' say "hello world" | ||
<span style="color:# | <span style="color:#008800">alias gs get all/sell all</span> - Chain commands with / | ||
<span style="color:# | <span style="color:#008888">ARGUMENT SUBSTITUTION:</span> | ||
<span style="color:# | <span style="color:#008800">$*</span> - All arguments | ||
<span style="color:# | <span style="color:#008800">$1</span> - First argument | ||
<span style="color:# | <span style="color:#008800">$2</span> - Second argument | ||
<span style="color:# | <span style="color:#008800">$1-</span> - First argument onwards | ||
<span style="color:# | <span style="color:#008800">$2-3</span> - Arguments 2 through 3 | ||
Example: <span style="color:# | Example: <span style="color:#008800">alias t tell $1 $2-</span> | ||
Usage: <span style="color:# | Usage: <span style="color:#008800">t bob hello there</span> → <span style="color:#008800">tell bob hello there</span> | ||
<span style="color:# | <span style="color:#008888">SPECIAL ALIAS - .LOGIN:</span> | ||
The <span style="color:# | The <span style="color:#008800">.login</span> alias executes automatically when you log in. | ||
<span style="color:# | <span style="color:#008800">SYNTAX:</span> alias .login <command1/command2/...> | ||
Commands are separated by forward slashes (/). | Commands are separated by forward slashes (/). | ||
Maximum of 8 commands in your .login alias. | Maximum of 8 commands in your .login alias. | ||
<span style="color:# | <span style="color:#008800">EXAMPLE:</span> | ||
<span style="color:# | <span style="color:#008800">alias .login who/shout I'm back!/look</span> | ||
This would: | This would: | ||
Line 45: | Line 45: | ||
3. Look at your current room | 3. Look at your current room | ||
<span style="color:# | <span style="color:#008888">RESTRICTIONS:</span> | ||
• Cannot create aliases for: alias, ralias, quit, save | • Cannot create aliases for: alias, ralias, quit, save | ||
• Cannot create self-referencing aliases | • Cannot create self-referencing aliases | ||
• Aliases cannot conflict with existing commands | • Aliases cannot conflict with existing commands | ||
<span style="color:# | <span style="color:#cc00cc">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</span> | ||
</pre></html> | </pre></html> | ||
[[Category:Help]] | [[Category:Help]] | ||
[[Main Page|← Back to Main Page]] | [[Main Page|← Back to Main Page]] |
Latest revision as of 04:04, 15 August 2025
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ALIAS SYSTEM ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SYNTAX: alias - List all your aliases alias <name> - Show what an alias does alias <name> <command> - Create a new alias ralias <name> - Remove an alias DESCRIPTION: Aliases allow you to create shortcuts for commonly used commands. You can have up to 50 aliases, each up to 20 characters long. EXAMPLES: alias n north - Make 'n' move you north alias hw say hello world - Make 'hw' say "hello world" alias gs get all/sell all - Chain commands with / ARGUMENT SUBSTITUTION: $* - All arguments $1 - First argument $2 - Second argument $1- - First argument onwards $2-3 - Arguments 2 through 3 Example: alias t tell $1 $2- Usage: t bob hello there → tell bob hello there SPECIAL ALIAS - .LOGIN: The .login alias executes automatically when you log in. SYNTAX: alias .login <command1/command2/...> Commands are separated by forward slashes (/). Maximum of 8 commands in your .login alias. EXAMPLE: alias .login who/shout I'm back!/look This would: 1. Show who's online 2. Shout "I'm back!" 3. Look at your current room RESTRICTIONS: • Cannot create aliases for: alias, ralias, quit, save • Cannot create self-referencing aliases • Aliases cannot conflict with existing commands :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::