MPW 3.2 Help Summaries Help summaries are available for each of the MPW commands. To see the list of all commands enter "Help Commands". To see a partial list of commands, e.g., those relating to compilers, enter "Help Languages". Some commands may appear in more than one category. In addition, brief descriptions of Expressions, Patterns, Selections, Characters, Shortcuts, and Variables, are also included. To see Help summaries, Enter a command such as Help Commands # a list of all commands Help Editing # a list of commands useful for editing Help FileSystem # a list of commands relating to files, # directories, and volumes Help Languages # a list of compiler/assembler names Help Projector # a list of commands in Projector, # a project/source control system Help Scripting # a list of commands useful primarily within scripts Help System # a list of commands that perform system functions Help Miscellaneous # a list of utilities and aids to software construction Help Window # a list of commands pertaining to windows Help Expressions # summary of expressions Help Patterns # summary of patterns (regular expressions) Help Selections # summary of selections Help Characters # summary of MPW Shell special characters Help Shortcuts # summary of MPW Shell shortcuts Help Variables # summary of the standard MPW shell variables Copyright Apple Computer, Inc. 1986-1991 All rights reserved. - Commands This is a full alphabetic list of all commands in MPW. This includes build-in commands, commands that are implemented as scripts, and commands that are implemented as tools. To get details, enter a command such as Help AddMenu # add a menu item Help AddPane # split the window into panes Help Adjust # adjust lines Help Alert # display an alert box Help Alias # define or write command aliases Help Align # align text to left margin Help Asm # MC68xxx Macro Assembler Help Backup # folder file backup Help Beep # generate tones Help Begin # group commands Help Break # break from For or Loop Help Browser # invoke Marker Browser Help BuildCommands # show build commands Help BuildMenu # create the Build menu Help BuildProgram # build the specified program Help C # C compiler Help Canon # canonical spelling tool Help Catenate # concatenate files Help CFront # C++ to C translator Help CheckIn # check a file into a project Help CheckOut # check a file out from a project Help CheckOutDir # specify the directory where checked out files will placed Help Choose # choose or list network file server volumes and printers Help Clear # clear the selection Help Close # close specified windows Help CMarker # generate Mark commands for C and C++ function definitions Help Commando # present a dialog interface for commands Help Compare # compare text files Help CompareFiles # compare text files and interactively view differences Help CompareRevisions# compare two revisions of a file in a project Help Confirm # display a confirmation dialog box Help Continue # continue with next iteration of For or Loop Help Copy # copy selection to Clipboard Help Count # count lines and characters Help CPlus # script to compile C++ source Help CreateMake # create a simple makefile Help Cut # copy selection to Clipboard and delete it Help Date # write the date and time Help Delete # delete files and directories Help DeleteMenu # delete user-defined menus and menu items Help DeleteNames # delete user-defined symbolic names Help DeletePane # delete panes from the window Help DeleteRevisions # delete previous revisions of files in a project Help DeRez # resource decompiler Help Directory # set or write the default directory Help DirectoryMenu # create the Directory menu Help DoIt # highlight and execute a series of shell commands Help DumpCode # write formatted CODE resources Help DumpFile # display contents of any file Help DumpObj # write formatted object file Help Duplicate # duplicate files and directories Help Echo # echo parameters Help Eject # eject volumes Help Entab # convert runs of spaces to tabs Help Equal # compare files and directories Help Erase # initialize volumes Help Evaluate # evaluate an expression Help Execute # execute command file in the current scope Help Exists # confirm the existence of a file or directory Help Exit # exit from a command file Help Export # make variables available to commands Help FileDiv # divide a file into several smaller files Help Files # list files and directories Help Find # find and select a text pattern Help Flush # flush the tools that the Shell has cached Help For # repeat commands once per parameter Help Format # set or display formatting options for a window Help Get # get a record from an indexed file Help GetErrorText # display error messages based on message number Help GetFileName # display a Standard File dialog box Help GetListItem # display items for selection in a dialog box Help Help # write summary information Help If # conditional command execution Help Lib # combine object files into a library file Help Line # find line in the target window Help Link # link an application, tool, or resource Help Loop # repeat commands until Break Help Make # build up-to-date version of a program Help MakeErrorFile # create error message textfile Help Mark # assign a marker to a selection Help Markers # list markers Help MatchIt # semi-intelligent language sensitive bracket matcher Help MergeBranch # merge a branch revision onto the trunk Help ModifyReadOnly # enables a read-only Projector file to be edited Help Mount # mount volumes Help MountProject # mount projects Help Move # move files and directories Help MoveWindow # move window to h,v location Help NameRevisions # define a symbolic name Help New # open a new window Help Newer # compare modification dates of files Help NewFolder # create a new folder Help NewProject # create a new project Help Open # open file(s) in window(s) Help OrphanFiles # remove Projector information from a list of files Help Parameters # write parameters Help Pascal # Pascal compiler Help PasMat # Pascal programs formatter Help PasRef # Pascal cross-referencer Help Paste # replace selection with Clipboard contents Help PerformReport # generate a performance report Help Position # display current line position Help Print # print text files Help ProcNames # display Pascal procedure and function names Help Project # set or write the current project Help ProjectInfo # display information about a Project Help Quit # quit MPW Help Quote # echo parameters, quoting if needed Help Rename # rename files and directories Help Replace # replace the selection Help Request # request text from a dialog box Help ResEqual # compares the resources in two files Help Revert # revert window to previous saved state Help Rez # resource compiler Help RezDet # detect inconsistencies in resources Help RotateWindows # send active (frontmost) window to back Help Save # save specified windows Help SaveOnClose # set save behavior when closing windows Help Search # search files for pattern Help Set # define or write Shell variables Help SetDirectory # set the default directory Help SetFile # set file attributes Help SetPrivilege # set access privileges for directories on file servers Help SetVersion # maintain version and revision number Help Shift # renumber command file positional parameters Help ShowSelection # place the selection within an editor window Help Shutdown # power down or restart the machine Help SizeWindow # set a window's size Help Sort # sort or merge lines of text Help StackWindows # arrange windows diagonally Help StreamEdit # scriptable text editor Help Target # make a window the target window Help TileWindows # arrange windows in a tiled fashion Help TransferCkid # move Projector information from one file to another Help Translate # translate characters Help Unalias # remove aliases Help Undo # undo the last edit Help Unexport # remove variable definitions from the export list Help Unmark # remove a marker from a window Help Unmount # unmount volumes Help UnmountProject # unmount projects Help Unset # remove Shell variable definitions Help UserVariables # uses Commando to set all the user variables Help Version # print the version of the MPW Shell Help Volumes # list mounted volumes Help WhereIs # find the location of a file Help Which # determine which file the shell will execute Help Windows # list windows Help ZoomWindow # enlarge or reduce a window's size - Editing The commands in this list are primarily useful for the editing of files. To get details, enter a command such as Help Adjust # adjust lines Help Align # align text to left margin Help Canon # canonical spelling tool Help Clear # clear the selection Help CompareFiles # compare text files and interactively view differences Help Copy # copy selection to Clipboard Help Cut # copy selection to Clipboard and delete it Help Entab # convert runs of spaces to tabs Help FileDiv # divide a file into several smaller files Help Find # find and select a text pattern Help Format # set or display formatting options for a window Help Line # find line in the target window Help Mark # assign a marker to a selection Help Markers # list markers Help MatchIt # semi-intelligent language sensitive bracket matcher Help Paste # replace selection with Clipboard contents Help Replace # replace the selection Help ShowSelection # place the selection within an editor window Help StreamEdit # scriptable text editor Help Translate # translate characters Help Undo # undo the last edit Help Unmark # remove a marker from a window - FileSystem The commands in this list relate to the manipulation of files and volumes. To get details, enter a command such as Help Catenate # concatenate files Help Close # close specified windows Help Compare # compare text files Help CompareFiles # compare text files and interactively view differences Help Count # count lines and characters Help Delete # delete files and directories Help Directory # set or write the default directory Help DumpFile # display contents of any file Help Duplicate # duplicate files and directories Help Equal # compare files and directories Help Erase # initialize volumes Help Exists # confirm the existence of a file or directory Help FileDiv # divide a file into several smaller files Help Files # list files and directories Help Move # move files and directories Help Mount # mount volumes Help New # open a new window Help Newer # compare modification dates of files Help NewFolder # create a new folder Help Open # open file(s) in window(s) Help Position # display current line position Help Print # print text files Help Rename # rename files and directories Help Save # save specified windows Help Search # search files for pattern Help SetDirectory # set the default directory Help SetFile # set file attributes Help SetPrivilege # set access privileges for directories on file servers Help SetVersion # maintain version and revision number Help Target # make a window the target window Help Unmount # unmount volumes Help Volumes # list mounted volumes Help WhereIs # find the location of a file - Languages The user should note that under normal circumstances, CFront should not be called directly. It has been made available primarily for those who wish to use a C compiler other than MPW C. If it is desired to see the intermediate C code produced from C++ source, use "CPlus -c …". For help, enter a command such as Help Asm # MC68xxx Macro Assembler Help C # C compiler Help CFront # C++ to C translator Help CPlus # script to compile C++ source Help Pascal # Pascal compiler - Projector Projector is a collection of built–in MPW commands and windows that help programmers (both individuals and teams) control and account for changes to all the files (documentation, source, applications etc.) associated with a software project. Here is a brief summary of the commands (the CheckIn, CheckOut, and NewProject commands also have windows that can be opened using the “-w” option to the respective command). For help, enter a command such as Help CheckIn # check a file into a project Help CheckOut # check a file out from a project Help CheckOutDir # specify the directory where checked out files will placed Help CompareRevisions # compare two revisions of a file in a project Help DeleteNames # delete user-defined symbolic names Help DeleteRevisions # delete previous revisions of files in a project Help MergeBranch # merge a branch revision onto the trunk Help ModifyReadOnly # enables a read-only Projector file to be edited Help MountProject # mount projects Help NameRevisions # define a symbolic name Help NewProject # create a new project Help OrphanFiles # remove Projector information from a list of files Help Project # set or write the current project Help ProjectInfo # display information about a Project Help TransferCkid # move Projector information from one file to another Help UnmountProject # unmount projects - Scripting The commands in this list are particularly useful within scripts. To get details, enter a command such as Help AddMenu # add a menu item Help Alert # display an alert box Help Alias # define or write command aliases Help Beep # generate tones Help Begin # group commands Help Break # break from For or Loop Help Confirm # display a confirmation dialog box Help Continue # continue with next iteration of For or Loop Help Date # write the date and time Help DeleteMenu # delete user-defined menus and menu items Help DirectoryMenu # create the Directory menu Help DoIt # highlight and execute a series of shell commands Help Echo # echo parameters Help Evaluate # evaluate an expression Help Execute # execute command file in the current scope Help Exists # confirm the existence of a file or directory Help Exit # exit from a command file Help Export # make variables available to commands Help For # repeat commands once per parameter Help GetFileName # display a Standard File dialog box Help GetListItem # display items for selection in a dialog box Help If # conditional command execution Help Loop # repeat commands until Break Help Parameters # write parameters Help Quote # echo parameters, quoting if needed Help Request # request text from a dialog box Help Set # define or write Shell variables Help Shift # renumber command file positional parameters Help Unexport # remove variable definitions from the export list Help Unset # remove Shell variable definitions - System The following commands provide direct access from MPW to certain system functions. For help, enter a command such as Help Choose # choose or list network file server volumes and printers Help Date # write the date and time Help GetErrorText # display error messages based on message number Help SetPrivilege # set access privileges for directories on file servers Help Shutdown # power down or restart the machine - Miscellaneous The following commands are a conglomeration of miscellaneous utilities and tools that are of use in the software construction process. To get details, enter a command such as Help Backup # folder file backup Help BuildCommands # show build commands Help BuildMenu # create the Build menu Help BuildProgram # build the specified program Help CMarker # generate Mark commands for C and C++ function definitions Help Commando # present a dialog interface for commands Help CreateMake # create a simple makefile Help DeRez # resource decompiler Help DumpCode # write formatted CODE resources Help DumpObj # write formatted object file Help Help # write summary information Help Lib # combine object files into a library file Help Link # link an application, tool, or resource Help Make # build up-to-date version of a program Help MakeErrorFile # create error message textfile Help PasMat # Pascal programs formatter Help PasRef # Pascal cross-referencer Help PerformReport # generate a performance report Help ProcNames # display Pascal procedure and function names Help Rez # resource compiler Help RezDet # detect inconsistencies in resources Help SetVersion # maintain version and revision number Help Sort # sort or merge lines of text Help Unalias # remove aliases Help Version # print the version of the MPW Shell Help Which # determine which file the shell will execute - Window The following commands are used to manipulate windows. For details, enter a command such as Help AddPane # split the window into panes Help Close # close specified windows Help DeletePane # delete panes from the window Help Format # set or display formatting options for a window Help MoveWindow # move window to h,v location Help New # open a new window Help Open # open file(s) in window(s) Help RotateWindows # send active (frontmost) window to back Help Save # save specified windows Help SaveOnClose # set save behavior when closing windows Help ShowSelection # place the selection within an editor window Help SizeWindow # set a window's size Help StackWindows # arrange windows diagonally Help Target # make a window the target window Help TileWindows # arrange windows in a tiled fashion Help Windows # list windows Help ZoomWindow # enlarge or reduce a window's size - Variables To see the current value, enter a command such as Echo {} Variables defined by the MPW Shell: Echo {Active} # full pathname of current active window Echo {Aliases} # list of all defined aliases Echo {Boot} # volume name of the boot disk Echo {Command} # full pathname of the last command executed Echo {MPW} # full pathname of the Macintosh Programmer's Workshop. Echo {ShellDirectory} # full pathname of the directory that contains the MPW Shell Echo {Status} # result of the last command executed (0 means successful) Echo {SystemFolder} # full pathname of the system folder Echo {Target} # full pathname of the target window Echo {User} # the current user name (initialized to the “Chooser” name) Echo {Windows} # list of current windows Echo {Worksheet} # full pathname of the Worksheet window Variables used by the MPW Shell: Echo {Commando} # name of the commando tool Echo {Commands} # list of directories to search for commands Echo {DirectoryPath} # list of common directories to speed changing directories Echo {Echo} # control the echoing of commands to diagnostic output Echo {Exit} # control script termination based on {Status} Echo {IgnoreCmdPeriod} # control use of cmd-. during critical sections Echo {HideHelpKey} # deactivate "help" key on extended keyboard Echo {Test} # control execution of tools and applications Echo {AutoIndent} # auto indent setting used for new windows Echo {CaseSensitive} # control case sensitivity for searching Echo {Font} # font used for new windows Echo {FontSize} # font size used for new windows Echo {NewWindowRect} # window rectangle used for new windows (top,left,bottom,right) Echo {PrintOptions} # options used by the print menu commands Echo {SearchBackward} # control direction of searching Echo {SearchType} # control type of searching (literal/word/expression) Echo {SearchWrap} # control wrap-around search Echo {StackOptions} # options used by the Stack Windows menu command Echo {Tab} # tab size used for new windows Echo {TileOptions} # options used by the Tile Windows menu command Echo {WordSet} # set of characters that constitue a word Echo {ZoomWindowRect} # window rectangle used for a zoomed window (top,left,bottom,right) Variables automatically set before script execution: {0} name of the currently executing script {1}, {2}, … {n} first, second, and nth parameter to the script {#} number of parameters {Parameters} equivalent to {1} {2} … {n} {"Parameters"} equivalent to "{1}" "{2}" … "{n}" Variables used for libraries and include files: Echo {AIncludes} # directories to search for assemby-language include files Echo {CIncludes} # directories to search for C include files Echo {CLibraries} # directory containing C library files Echo {Libraries} # directory containing shared library files Echo {PInterfaces} # directory containing Pascal interface files Echo {PLibraries} # directory containing Pascal library files Echo {RIncludes} # directory containing Rez include files - Characters The characters listed below have special meanings in the command language. Space Space separates words. Tab Tab also separates words. Return Return separates commands. ; Semicolon also separates commands. | Pipe separates commands and pipes output to input. && And separates commands, executing second if first succeeds. || Or separates commands, executing second if first fails. (…) Parenthesis group commands. Parenthesis also group characters in filename patterns. # Comment begins comments. ∂ Escape (Option-D) quotes the following character. '…' Single quote quotes all other characters. "…" Double quote quotes all characters except ∂, {, and `. /…/ Slash quotes all characters except ∂, {, and `. \…\ Backslash quotes all characters except ∂, {, and `. {…} Braces denote variable substitution. `…` Backquotes denote command substitution. ? Question mark matches any character in filename patterns. ≈ Approximately (Option-X) matches any string in patterns. […] Brackets enclose character sets in filename patterns. * Star indicates zero or more repetitions in patterns. + Plus indicates one or more repetitions in patterns. «…» European quotes (Option-\ and Option-Shift-\) enclose repeat counts. < Less-than indicates an input file specification. > Greater-than indicates an output file specification. >> Indicates appending to an output file specification. ≥ Greater-than-or-equal indicates a diagnostic specification. ≥≥ Indicates appending to a diagnostic file specification. ∑ Capital sigma (option-w) indicates both an output file and diagnostic output file specification. ∑∑ Indicates appending to the output and diagnostic file specification. … Elipsis (Option-;) signals the Shell to use Commando - Expressions Numbers may be expressed in decimal, hexadecimal, octal, or binary. Any of the following formats may be used: [0-9]+ decimal number 0x[0-9a-f]+ hexadecimal number $[0-9a-f]+ hexadecimal number 0[0-7]+ octal number 0b[01]+ binary number The operators listed below are used in expressions in the Evaluate, If, Else If, Break, Continue, and Exit commands. Alternate spellings of several operators are provided. All of the operators are evaluated from left to right. Operators with the highest precedence are listed first, and operators in the same group have equal precedence. (…) expression grouping - unary negation ~ bitwise negation ! NOT ¬ logical NOT (¬ is Option-L) * multiplication ÷ DIV division (÷ is Option-/) % MOD modulus division + addition - subtraction << shift left >> shift right < less than <= ≤ less than or equal to (≤ is Option-<) > greater than >= ≥ greater than or equal to (≥ is Option->) == equal != <> ≠ not equal (≠ is Option-=) =~ equal to a pattern !~ not equal to a pattern & bitwise AND ^ bitwise XOR | bitwise OR && AND logical AND || OR logical OR - Selections - selections specify a selection or insertion point § current selection (Option-6) n line number n !n line n lines after end of current selection ¡n line n lines before start of selection (Option-1) position position (defined below) markerName selection marked by markerName pattern pattern (defined below) (selection) selection grouping selection:selection both selections and everything in between position - positions specify an insertion point • position before first character of file (Option-8) ∞ position after last character of file (Option-5) ∆selection position before first character of selection (Option-J) selection∆ position after last character of selection (Option-J) selection!n position n characters after selection selection¡n position n characters before selection (Option-!) pattern - patterns specify characters to be matched /entireRE/ regular expression - search forward \entireRE\ regular expression - search backward Help Patterns # See "Help Patterns" for more information. - Patterns - Patterns specify characters to be matched /entireRE/ regular expression - search forward \entireRE\ regular expression - search backward entireRE •RE regular expression at beginning of line (Option-8) RE∞ regular expression at end of line (Option-5) RE regular expression RE simpleExpr simple regular expression - defined below (RE)®digit tagged RE - refer to match as ®digit (Option-R) 'string' literal - no characters within '…' are special "string" literal - only ∂, {, and ` are special within "…" RE1RE2 regular expression RE1 followed by RE2 simpleExpr (RE) regular expression grouping charExpr single character regular expression - defined below simpleExpr* simple expression zero or more times simpleExpr+ simple expression one of more times simpleExpr«n» simple expression n times (Option-\, Option-Shift-\) simpleExpr«n,» simple expression at least n times simpleExpr«n1,n2» simple expression at least n1, at most n2 times charExpr character character (unless it has special meaning) ∂character character - defeats any special meaning (Option-D) ? any character except Return ≈ zero or more characters, except Return (Option-X) [charList] any character in the list [¬charList] any character not in the list (Option-L) charList [ [ first in the list represents itself ] ] first in the list represents itself - - first in the list represents itself character character charList character list of characters character-character character range (e.g. A-Z) - ShortCuts The following is a list of MPW Shell shortcuts: Double click select word Triple click select line Double Clicking on any of the characters (,),[,],{,},',",/,\,` will select everything between the character and its mate. LeftArrow move insertion point one character to the left RightArrow move insertion point one character to the right UpArrow move insertion point one line above current position DownArrow move insertion point one line below current position Opt-LeftArrow move insertion point one word to the left Opt-RightArrow move insertion point one word to the right Shift-LeftArrow extend selection one character to the left Shift-RightArrow extend selection one character to the right Shift-UpArrow extend selection one line above current position Shift-DownArrow extend selection one line below current position Shift-Opt-LeftArrow extend selection one word to the left Shift-Opt-RightArrow extend selection one word to the right Cmd-LeftArrow move insertion point to beginning of current line Cmd-RightArrow move insertion point to end of current line Cmd-UpArrow move insertion point up one screen size Cmd-DownArrow move insertion point down one screen size Cmd-Shift-LeftArrow extend selection to beginning of current line Cmd-Shift-RightArrow extend selection to end of current line Cmd-Shift-UpArrow extend selection up one screen size Cmd-Shift-DownArrow extend selection down one screen size Cmd-Opt-UpArrow move insertion point to beginning of file Cmd-Opt-DownArrow move insertion point to end of file Cmd-Shift-Opt-UpArrow extend selection to beginning of file Cmd-Shift-Opt-DownArrow extend selection to end of file Delete delete character to the left Del (Extended Keyboard) delete character to the right Shift-Delete delete character to the left Shift-Del delete character to the right Opt-Delete delete word to the left Opt-Del delete word to the right Cmd-Delete delete from current position to end of file Cmd-Del delete from current position to end of file Searching shortcuts Cmd-Shift-G reverse the direction of "Find Same" Cmd-Shift-H reverse the direction of "Find Selection" Cmd-Shift-T reverse the direction of "Replace Same" Holding down Shift while selecting OK will reverse the direction of "Find" and "Find and Replace" Holding down Option while selecting "Tile Windows" or "Stack Windows" will include the worksheet in the tiling or stacking Holding down Option while pressing Return will disable auto-indent for that line. Holding down Option while pressing Enter will invoke Commando on that command line. In Dialogs without an EditText item Y Yes N No CMD . Cancel ESC Cancel - AddMenu # add a menu item AddMenu [menu [item [command…]]] > menuList Note: Item can contain the following metacharacters ("" means any character): / Assign the keyboard equivalent Command- ! Place to the left of the menu item ^n Item has an icon, where n is the icon number ( Item is disabled