Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cmdo(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

CommandShell(1)




cmdo(1) cmdo(1)
NAME cmdo - builds command lines interactively SYNOPSIS cmdo command cmdo -o resfile [-n] [-s] command ARGUMENTS command Specifies the command for which you want help with the construction of a command line. If the -o option was given, this argument specifies the name of the command for which you wish to compile a Commando dialog. -n Specifies that the command not be executed. -o Compiles the command into the resource file specified by resfile. See ``Compiling Resources'' later in the ``Description'' section for additional information. resfile Specifies the filename of the compiled resource file. -s Runs the command silently (the dialog box is not displayed). DESCRIPTION cmdo helps you build A/UX command lines using specialized Macintosh dialog boxes. The dialog boxes make it easy to select options, choose files, and access help information, as well as build compound command lines. To build commands with many options and parameters, you may employ several nested dialog boxes. The contents of dialog boxes are specified in dialog scripts, written in the Commando Script Language. This language is detailed in A/UX Development Tools. The first form of the syntax, the more common of the two, invokes Commando on the specified command. The second form compiles a resource file to speed execution. Commando resource files are fully documented in MPW Programmer's Workshop. Using cmdo You can run cmdo in two ways. The first is to enter a complete cmdo command line, as follows: cmdo command January 1992 1



cmdo(1) cmdo(1)
The second is to type a partial command line containing only the name of the command within a CommandShell window, then select Commando from the Edit menu. The Command-key equivalent for selecting Commando from the menu is COMMAND- K. This action invokes cmdo on the last word of the command line. The first method of invoking cmdo executes the command. The second method pastes the command line arguments onto the command line, allowing you to create the desired command line by adding more commands, command options, and arguments. You can then execute the compound command by pressing the RETURN key. Using this method, you can create a command line of many commands piped together, also known as a compound command line. Search Paths Commando searches in the following order: 1. Commando searches for resources, then dialog scripts, in the path specified by $CMDODIR. 2. Commando searches for resources, then dialog scripts, in the directory within /mac/lib/cmdo having the same first letter as the command you are invoking. 3. Commando searches for resources in the path specified by $PATH. Compiling Resources Commando creates Macintosh dialog boxes from which you select command options and arguments. You can customize the appearance of these dialog boxes by compiling them and modifying them with cmdo's built-in resource editor. For more information, see MPW Programmer's Workshop. EXAMPLES To display the ls Commando dialog box, use this command line: cmdo ls To compile a resource file for an application named statpack, use the command line cmdo -o /usr/bin/statpack -r -s statpack The preceding command compiles a resource file and puts it in /usr/bin. 2 January 1992



cmdo(1) cmdo(1)
LIMITATIONS When using compiled Commando scripts, make sure the names of the command, dialog script, and resource (prefaced by a %, of course) are all be the same. 24-bit login sessions do not support command-line invocation of Commando. NOTES CommandShell invokes cmdo when you double-click an A/UX command icon for which a dialog script has been written (assuming the script is in the search path). If you execute the command using this method, it executes in a subshell. 24-bit login sessions do support this method of invoking Commando. FILES /mac/bin/cmdo The cmdo command /mac/lib/cmdo/* Directories containing source files SEE ALSO CommandShell(1) ``Commando'' in A/UX Development Tools ``Creating a Commando Interface for Tools'' in A/UX Programming Languages and Tools, Volume 2 January 1992 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026