ALIAS

alias.html
hide random home http://www.mentasm.com/~mramiga/c/alais.html (Amiga Plus Extra No. 5/97, 05/1997)


FORMAT:    ALIAS [(name)] [(string...)]
Template:  NAME,STRING/F
Locaoion:  Internal

ALIAS creates aliases, or alternative names, for AmigaDOS commands. ALIAS can be used to abbreviate frequenttly used commands or replace standard command names with different names.

When AmigaDOS encounters [name], it replaces it with the defined [string], integrates the result with the rest of the command line as an AmigaDOS command. [Name] is the alias for the command and [string] is the command to be substituted for the alias.

An alias must be entered at the beginning of the command line. You can enter arguments after the alias, but you cannot create an alias to represent a series of arguments. For example, in the following command line:


the WINDOW argument cannot be replaced with an alias.

You can substitute a file name or other instruction within an alias by placing square brackets ([]) with nothing between them in the {string}. Any argument entered after the alias is inserted at the brackets.

ALIAS [name] displays the [string] for that alias. Entering ALIAS alone lists all current aliases.

Aliases are local to the shell in which they are defined. If you create another shell with the NEWSHELL command, it shares the same aliases as its parent shell. However, if you create another shell with Execute Command menu item, it does not recognize aliases created inyour original shell. A global alias that is recognized by all shells can be created by inserting tthe alias in the shell-startup file.

To remove an alias, use the UNALIAS command.