Go to: Synopsis. Return value. MEL examples.
alias
<aliasName> <commandName> [ arg_1 ... arg_n ] or { list-of-statements }
alias is undoable, NOT queryable, and NOT editable.
MEL aliases don't work exactly like csh aliases. When MEL sees the use of an alias, it doesn't replace the alias name with the text of what it is aliased with and rescan that. It can't do that. It isn't a command line interpreter like csh is. When MEL sees an alias command, it enters the name into the same procedure table with the regular user written MEL procedures and it keeps a pointer to the argument list passed to it (in the case of the first syntax). When someone uses name in a script, it is processed just like a procedure call. You cannot pass arguments to an alias specified as a statement list. MEL is an interpreter in the sense that it generates a data structure instead of real machine code. Instead of having your machine execute the output, MEL executes it by interpreting the data structure it generated for your code. Shell interpreters execute input as it is being read in. This allows them to do text replacement on the fly. Fortunately MEL has procedures which make up for any functionality that is missing from its own version of aliases. Special Notes:None
alias s sphere -r; s 2.2; // creates a sphere of radius 2.2. alias s2 s 2; // nested alias: sphere -r 2. alias es s -esw; es 90; // syntax error: sphere -r -esw alias jj { select -all; delete; };