|
|
When the
show
descriptor
is defined and evaluates to FALSE,
the item in which it is defined does not appear on the menu.
Defining the show descriptor as a variable allows you
to decide dynamically whether or not to display a menu item.
In this example, the third item will not appear on the menu created by the following menu definition file if the login ID of the user running your application is not root:
menu="My First Menu" begrow=center begcol=30name="Run UNIX System V" action=unix-system
name="Where am I?" description="print working directory" action=`pwd | message`nop
name="System Administration" action=`run scoadmin`nop show=`if [ $LOGNAME != root ]; then echo FALSE; else echo TRUE; fi`
name="Exit My Application" action=exit
Menu.show: an example of the show descriptor
This is how Menu.show is displayed for a user logged in as joe:
Menu.show: screen output