(index ("define-command-group" 0) ("define-command-group" 0) ("define-command-group*" 0) ("define-command-group*" 0) ("make-command-group" 1160) ("make-title" 1405) ("abort-parse" 1621) ("parse" 1939) ("groups" 2180) ("help-heading" 2636) ("help-minimum-intercolumn-space" 2856) ("make-command" 3175) ("command-name" 3175) ("command-args" 3175) ("command-doc" 3175) ("command-body" 3175) ("command-name-string" 3175))
(def (sig (syntax "(define-command-group name command-def ...)" (id define-command-group)) (syntax "(define-command-group name #:title title command-def ...)" (id define-command-group)) (syntax "(define-command-group* name command-def ...)" (id define-command-group*)) (syntax "(define-command-group* name #:title title command-def ...)" (id define-command-group*))) (p (tt "define-command-group") " is the typical way to define a command group.  It defines the symbol " (tt "name") " as a command group constructed according to the rest of the arguments.  It adds the new group to " (tt "(groups)") ".") (p "The starred form, " (tt "define-command-group*") ", is the same, except that it does not automatically add the new group to " (tt "(groups)") ".") (p "When no title is given, " (tt "make-title") " is used to generate one automatically based on " (tt "name") ".  The title is used in the -help display.") (p "Each command-def looks like " (tt "((name . args) . body)") " or " (tt "((name . args) #:doc doc . body)") ".  The " (tt "#:doc") " keyword may be used to store a short docstring for the command, which will be printed in the -help display."))
(def (sig (procedure "(make-command-group title commands)" (id make-command-group))) (p "You will not normally use this procedure directly.  It is part of the expansion of " (tt "define-command-group") " and " (tt "define-command-group*") "."))
(def (sig (parameter "make-title" (id make-title))) (p "Value is a procedure that converts a symbol to a string, suitable for use in -help titling.  The default upcases the string and replaces hyphen with spacen."))
(def (sig (procedure "(abort-parse)" (id abort-parse))) (p "Helper procedure for use in command bodies to stop calling of commands, and inform the calling program that it should exit.  This is used by the built-in special commands " (tt "-help") " and " (tt "-version") " to ensure that only one command is called."))
(def (sig (procedure "(parse input)" (id parse))) (p "Parse the list of command-line arguments, input into commands and call them.  Returns " (tt "#t") " on successful completion of calling commands, " (tt "#f") " if parsing was aborted."))
(def (sig (parameter "groups" (id groups))) (p "The groups parameter holds the list of command-groups that " (tt "parse") " draws from.  By default, it starts with a single group, special-options, which contains the commands -help and -version.  The syntax form " (tt "define-command-group") " adds to this list.  To remove the provided special-options group, call " (tt "(group '())") " to initialize the list before defining any other command groups."))
(def (sig (parameter "help-heading" (id help-heading))) (p "The string value of help-heading is printed out by the provided -version command, and as the first line of the provided -help command.  Be sure to set this."))
(def (sig (parameter "help-minimum-intercolumn-space" (id help-minimum-intercolumn-space))) (p "The provided -help command prints command call forms and docstrings in two columns.  The help-minimum-intercolumn-space parameter gives the minimum number of spaces by which to separate the two columns, defaulting to 3."))
(def (sig (procedure "(make-command name args doc body)" (id make-command)) (procedure "(command-name cmd)" (id command-name)) (procedure "(command-args cmd)" (id command-args)) (procedure "(command-doc cmd)" (id command-doc)) (procedure "(command-body cmd)" (id command-body)) (procedure "(command-name-string cmd)" (id command-name-string))))
