/KUIP_ALIAS

Operations with aliases. Aliases are defined to provide shortcut abbreviations for the input line or some part of it. When encountered on an input line an alias is replaced by its string value which can contain further aliases. (Be careful not to define recursive aliases.)

To juxtaposition aliases, a double slash can be used as concatenation sign. Inside quoted strings and for the ALIAS commands themselves the alias substitution is inhibited. Otherwise

ALIAS/CREATE ALPHA BETA ALIAS/CREATE ALPHA BETA

whould create an recursive alias BETA and

ALIAS/CREATE ALPHA BETA ALIAS/CREATE BETA GAMMA ALIAS/DELETE ALPHA

would delete the alias name BETA instead of ALPHA itself.

/KUIP/ALIAS/CREATE name value [ chopt ]

NAME C Alias name
VALUE C Alias value
CHOPT C Option D='A'

CHOPT:

'A' create an Argument alias
'C' create a Command alias
'N' No alias expansion of value

Create an alias NAME which should be substituted by VALUE. An alias name is a sequence of letters and digits starting with a letter. The underscores ('_'), the at-sign ('@') and the dollar-sign ('$') count as letters.

There are two types of aliases: Command aliases are recognized only if they occur in the command position, i.e. as the first token on the line. Argument aliases are recognized anywhere on the command line (except inside quoted strings) if they are surrounded by one of the following separators:

blank / , = : . % ' ( )

Also switch ON the alias translation, i.e. ALIAS/TRANSLATION ON. If CHOPT='C' then the alias is a command alias, i.e. an alias that will only be translated when it is the first token on a command line. Example:

Alias/Create GG Graph/Struct/Scratch Alias/Create FF File1/Name1/Name2 GG FF/ID

is equivalent to

Graph/Struct/Scratch File1/Name1/Name2/ID Alias/Create LS DIR C

is equivalent to

DIR

only when LS is the first token on a command line. In the following case LS will not be translated

SHELL LS

Aliases occuring inside an value are expanded indepedent whether the value is enclosed by quotes. The option -N allows to suppress this implicit alias expansion.

/KUIP/ALIAS/LIST [ name ]

NAME C Alias name wildcard D='*'

List all aliases matching the wildcard (names and values).

/KUIP/ALIAS/DELETE name

NAME C Alias name wildcard Loop

Delete the definition of aliases matching the wildcard. NAME='*' deletes all aliases.

/KUIP/ALIAS/TRANSLATION [ option ]

OPTION C Option D='ON'

OPTION:

'?' show current setting
'ON' switch alias translation ON
'OFF' switch alias translation OFF

Switch ON/OFF the alias translation. If OFF, alias definitions are not used in parsing the command lines. It is automatically switched ON when an alias is created. If OPTION='?' the current value is shown. The startup value is OFF.