This is args.egg.info, produced by makeinfo version 4.7 from eggdoc-output.texi. INFO-DIR-SECTION The Algorithmic Language Scheme START-INFO-DIR-ENTRY * args.egg: (args.egg). Command-line argument handling facilities, layered on SRFI 37 (args-fold). END-INFO-DIR-ENTRY  File: args.egg.info, Node: Top, Next: About this egg, Up: (dir) args egg ******** Command-line argument handling facilities, layered on SRFI 37 (args-fold). Written by Zbigniew (http://3e8.org/zb) This manual corresponds to version 1.0 of the args extension library for Chicken Scheme. * Menu: * About this egg:: * Documentation:: * Bugs:: * Examples:: * License:: * Index::  File: args.egg.info, Node: About this egg, Next: Documentation, Prev: Top, Up: Top 1 About this egg **************** * Menu: * Version history:: * Requirements:: * Usage::  File: args.egg.info, Node: Version history, Next: Requirements, Up: About this egg 1.1 Version history =================== `1.0' Initial release  File: args.egg.info, Node: Requirements, Next: Usage, Prev: Version history, Up: About this egg 1.2 Requirements ================ This egg requires the following extensions: `srfi-37 [args-fold]', `srfi-13 [string-lib]', `srfi-1 [list-lib]'  File: args.egg.info, Node: Usage, Prev: Requirements, Up: About this egg 1.3 Usage ========= Load this egg like so: `(require-extension args)'  File: args.egg.info, Node: Documentation, Next: Bugs, Prev: About this egg, Up: Top 2 Documentation *************** This extension provides a wrapper around SRFI 37 (args-fold). The main goal is to let the user parse command-line arguments without having to write a lot of similar support code every time. By default, options and operands (non-options) are collected into two lists and returned by the parser, and unrecognized options complain and display help. Therefore, it is very possible not to write any option-procs, operand-procs, or unrecognized-procs as required by SRFI 37. However, the capability to customize is there should you need it. Additionally, the help text for your options can be generated for you, so your options and usage information don't get out of sync. * Menu: * Creating options:: * Parsing the command line:: * Usage information:: * Operands and unrecognized options (advanced)::  File: args.egg.info, Node: Creating options, Next: Parsing the command line, Up: Documentation 2.1 Creating options ==================== -- macro: args:make-option (args:make-option (OPTION-NAME ...) ARG-DATA [BODY]) Make an args:option record, suitable for passing to args:parse. OPTION-NAME ... is a sequence of short or long option names. They must be literal symbols; single-character symbols become short options, and longer symbols become long options. So `(args:make-option (c cookie) ...)' specifies a short option -c and long option -cookie. Under the hood, (c cookie) becomes '(#\c "cookie"), as expected by SRFI 37's OPTION. ARG-DATA is either a pair (ARG-TYPE ARG-NAME) or a plain keyword ARG-TYPE. ARG-TYPE is a keyword that specifies whether the option takes an argument: `#:required' Argument is required `#:optional' Argument is optional `#:none' No argument (actually, any other value than #:required or #:optional is interpreted as #:none) ARG-NAME, if provided, is a string specifying the name of the argument. This name is used in the help text produced by args:usage. BODY is an optional sequence of statements executed when this option is encountered. Behind the scenes, BODY is wrapped in code which adds the current option and its argument to the final options alist. So, simply leave BODY blank and options will be collected for you. BODY is an option-processor as defined in SRFI 37, and has access to the variables OPT (the current #