alias


Name

alias — create an alias for a command

Synopsis

Supported for RTserver, RTclient, RTmon, RTgms, and RTacl:

alias 
alias name 
alias name definition 

Description

The alias command creates a synonym for a command. When an alias is used as the first word of a command, its definition is used in place of name. An alias is similar to a UNIX C shell alias or an OpenVMS DCL symbol. Aliases are useful as shortcuts for frequently used commands.

If alias is called without any arguments, it lists all aliases. If it is called with only name, it lists the definition of that alias. If alias is called with both name and definition (which can be any number of words), then the alias definition is assigned to name.

Three aliases, ls, sh, and exit, come predefined in all the SmartSockets processes on UNIX, Windows, and OpenVMS.

ls is defined as:

UNIX:
sh ls 
OpenVMS:
sh directory 
Windows:
sh dir 

pwd is defined as:

UNIX:
sh pwd 
OpenVMS:
sh show default 
Windows:
sh cd 

exit is defined as:

quit force 

Caution

Alias substitution is only accomplished on the first word of a command.

Because commands are separated by semicolons, it can be tricky to create an alias consisting of several commands. The solution is to put double quotes around the entire alias definition.

Do not create recursive aliases. The command interface cannot detect such aliases. In particular, aliases of the form alias foo foo or alias foo bar; alias bar foo cause an infinite loop.

To prevent irreversible damage to your SmartSockets system, this command should not be specified with the Enable_Control_Msgs option without careful supervision.

See Also

unalias, sh

Examples

PROMPT> alias a alias 
Alias a installed 
PROMPT> alias q quit force 
Alias q installed 
PROMPT> alias 
a alias 
exit quit force 
ls sh ls 
pwd sh pwd 
q quit force 
PROMPT> alias exit 
quit force 
PROMPT> alias reconnect "disconnect; connect" /*quotes around definition 
*/ 
PROMPT> reconnect 
Disconnecting (warm) from RTserver. 
Attempting to reconnect to RTserver. 
Connecting to project <rtworks> on <_node> RTserver. 
Using local protocol. 
Message from RTserver: Connection established. 
Start subscribing to subject </_workstation_26483> again. 

TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com