alias ****** Documentation for the shell-alias api in */obj/secure/shell/alias.c*. Command ======= USAGE: There are 3 different versions of the alias command: |``alias -- will give you a menu for adding aliases. some things can only`` be done through the alias menu. |``alias str -- shows the value of alias 'str'`` |``alias str expansion -- sets the alias 'str' to the expansion.`` An alias definition can change each time you use the alias: | $1 -- Wherever you put this in your alias definition, the $1 will be replaced with the first word after the alias when you use the alias. You can do the same with $2, $3, $4, ad infinitum. If you have $1 in your alias definition, but don't provide a first argument when you use an alias, the default value for $1 is used. If you're using the alias menu to add an alias, you can set the default value when you are done with the alias definition. Example: If you alias "you're" to: say Hey, $2, you're $1! When you type: you're studly Rust You'll say: "Hey, Rust, you're studly!" | $\* -- It's the same as $1, but it means 'everything else'. Example: If you alias "you're" to: say $2, you're $1! Do you $\*? When you type: you're studly Rust exercise much You'll say: "Hey, Rust, you're studly! Do you exercise much?" Notice $\* matches any number of words, whereas $1, $2, etc... only match one word. If you don't put a $\* in your expansion, one will be automatically added to the end of the alias for you. If you have an alias, but don't want to use it, you can prepend a \\ to make the game ignore your alias. For example, if you have 'grin' aliased to 'grin evilly', and you type: \\grin psychopathically you'll get: You grin psychopathically. To make an alias where you don't need to type a space after the alias, use the menu, and answer 'y' when the game asks: 'Allow space omission?' .. TAGS: RST Functions ========= .. c:function:: nomask void remove_alias(string alias_name) Remove an alias from an alias set. .. c:function:: void setup_for_save() Sets up M_SAVE to save some variables .. c:function:: varargs void add_alias(string name, string template, string *defaults, int xverb) Add an alias to an alias set. .. c:function:: mixed expand_alias(string input) Expand an argv with any aliases if applicable. *File generated by Lima 1.1a4 reStructured Text daemon.*