Command descriptors
The name and action descriptors must be included in each set
of command descriptors, and name must be first in each set.
action-
The action descriptor defines the
operation to perform when the command name is selected.
help-
The help descriptor defines a command to be executed when the
user asks for help on name.
Since this descriptor is evaluated when the user requests
help, the specification of what help is displayed can be
determined through parameters that are set interactively.
interrupt-
The interrupt descriptor defines whether an
executable that is coded in the action
descriptor in a command definition
can be interrupted by the user.
If not coded, it defaults
to FALSE.
If this descriptor evaluates to TRUE, then executables defined for
this command's action descriptor will be
interruptible.
If defined among the general descriptors in an initialization
file, that value of interrupt affects all user-defined commands which
do not redefine interrupt.
Note that built-in FMLI commands (such as checkworld) cannot
be interrupted.
name-
The name descriptor defines a string (the name of the command)
that will appear in the Command Menu and that users can enter on
the command line.
oninterrupt-
The oninterrupt descriptor specifies the action to be taken when an
interrupt signal is received.
If it is not defined anywhere in your application, it
defaults to `message Operation interrupted!`nop.
The oninterrupt descriptor is ignored if
interrupt is not coded
or if interrupt evaluates to FALSE.
If defined among the general application descriptors in the initialization
file, that value of oninterrupt affects all user-defined commands which
do not redefine oninterrupt.
Example of adding an application-specific command
You might add a new, application-specific command as follows:
name="date"
action=`date | message`nop
help=open $MYFRAMES/Text.datehelp
That will give the user a date command that puts
the current date and time on the message line.
Example of disabling an existing FMLI command
You can disable an existing FMLI command, unix-system, for instance,
by specifying
name="unix-system"
action=nop
When an FMLI command that appears in the Command Menu by default is
disabled in this way, its name no longer appears in the Command Menu.
NOTE:
When you disable an FMLI command in the commands file, the
command becomes unavailable not only to users,
but to developers.
That is, you cannot use that command in frame definition files or
application level files.
In particular, do not disable the exit command.
The contents of the commands file will be reflected in the Command Menu.
You should avoid giving a command a name that is a partial
match of another command, as
pr
is a partial match of both
prev-frm
and
prevpage
,
because this makes it more
difficult for users to navigate to (select) that command using
character matching.
Next topic:
The alias file
Previous topic:
The commands file
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004