The ALIAS command is used to create and maintain command line aliases, which can cut down on typing and will allow for the configuration of the command environment.
ALIAS
or
ALIAS token
or
ALIAS token alias-string
token - The aliased token. It must follow the usual
rules for an identifier.
alias-string - The string to be substituted for the token.
The alias command has three forms. The first is with no arguments and produces a list of the currently defined aliases. The second takes noe argument and reports the aliasing applied to the given token. The third form is used to attach the specified alias string to the token. Thereafter, when the token is the first item on an interactively entered command line, the token will be replaced by the given alias-string.
Example 1:
This is a simple example is the following alias which replaces 'ls' with 'system "ls"'. Thereafter, typing 'ls' in EASI would result in the ls command being passed to the operating system.
alias ls "system \"ls\"" ls
The alias-string can in fact take on a more complex syntax. It is possible to have command line arguments substituted into the alias string. Individual command lines arguments may be indicated by number, i.e., $1, $2 or $3. The set of all command line argument may be indicated as $*. All command line arguments that are not explicitly referenced in the alias expansion are appended to the end of the resulting string.
Example 2:
An example of using argument substitution is shown by the ls alias, with all arguments also passed to the operating system. In this case all arguments on the EASI command line to 'ls' will be put inside the string passed to the operating system.
alias ls "system \"ls $*\"" ls *.pix
Example 3:
The following (more complex) example sets up an alias called 'clear' which takes two arguments. The first is the name of a PCIDSK file, and the second is an image plane to clear to zero. Note that the quotes, and the backslashes in the alias string have to be escaped with the backslash.
alias clear "file=\"$1\" \\ dboc=$2 \\ valu = 0 \\ run clr" clear eltoro.pix 1 clear irvine.pix 1,2,3
The arguments are determined from the command line string by breaking on white space. Hence, in the above example, the channel list "1,2,3" is taken as one argument. There are limits to what can be accomplished with the aliases alone; however, aliases can be used to invoke a user defined function, passing all the arguments as a single string. This user defined function can then parse the arguments however it pleases.
Example 4:
The following example demonstrates this without showing what the user defined function editfunc does to parse the passed arguments.
alias edit "call editfunc( \"$*\" )" edit file=irvine.pix segment=11
Currently, there is no command to remove aliases once instituted and it is important to remember that aliases are only applied to interactive input, not procedures.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.