Spice_icon SPICE
Spectrometer Instrument Control Environment


alias:

The alias command will add a user defined alias.

The syntax for the alias command is:

         alias name "def %1 %2*%3..." [minvars=n]

Where the alias definition must be in quotes and the optional minvars argument defines the minimum number of variables which must be specified when the alias is called from the command line.

Typing the alias command with no arguments will update all the stored alias definitions based on the entries in the alias configuration files and will give a list of all available alias definitions.



Alias definitions can also be added by manually adding an entry to the user alias configuration file.  A typical entry has the following form:

[scanrel]
definition="scan %1 @(%1)+%2 @(%1)+%3 %4"
numbervars=4
minvars=4
help="Do a relative scan using the default preset.  Eg. scanrel s1 -1 1 .1"


The above entry shows the alias definition for the scanrel alias.  The alias name itself is the section name and the definition is defined using the definition key.  Note that command-line arguments are specified using a %n syntax where the arguments included in the definition must be sequentially numbered.  The numbervars key indicates the number of variables defined in the definition and the minvars indicates the minimum number of variables which must be given on the command line.  This is included to allow alias definitions where some of the arguments are optional.  The help key is used with the help command to provide additional information about a specific alias.