The getopt Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The getopt Reference Manual

This is the getopt Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:41:20 2022 GMT+0.

Table of Contents


1 Introduction

Library: getopt
Author:  Kevin Rosenberg 
URL:     http://kpe.io/files/getopt/

This package provides a module for analyzing a list of command-line
arguments. It uses a command-line syntax similar to the GNU getopt_long
function. The package also provides an automated test suite which
uses the ptester library from http://kpe.io/files/ptester/

 


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 getopt

Maintainer

Kevin M. Rosenberg <kmr@debian.org>

Author

Kevin Rosenberg <kevin@rosenberg.net>

License

BSD

Version

1.0

Source

getopt.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 getopt/getopt.asd

Source

getopt.asd.

Parent Component

getopt (system).

ASDF Systems

getopt.

Packages

getopt-system.


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.2 getopt/package.lisp

Source

getopt.asd.

Parent Component

getopt (system).

Packages

getopt.


Previous: , Up: Lisp   [Contents][Index]

3.1.3 getopt/main.lisp

Dependency

package.lisp (file).

Source

getopt.asd.

Parent Component

getopt (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 getopt-system

Source

getopt.asd.

Use List
  • asdf/interface.
  • common-lisp.

Previous: , Up: Packages   [Contents][Index]

4.2 getopt

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: getopt (args options)

Processes a list of arguments and options. Returns filtered argument list and alist of options.
opts is a list of option lists. The fields of the list are
- NAME name of the long option
- HAS-ARG with legal values of :NONE, :REQUIRED, :OPTIONAL
- VAL value to return for a option with no arguments

Package

getopt.

Source

main.lisp.

Function: match-unique-abbreviation (abbr strings)

Returns position of ABBR in STRINGS. ABBR may be a unique abbreviation. Returns NIL if no match found.

Package

getopt.

Source

main.lisp.


5.2 Internals


Previous: , Up: Internals   [Contents][Index]

5.2.1 Ordinary functions

Function: analyze-arg (arg)

Analyzes an argument. Returns option-type,base-name,argument

Package

getopt.

Source

main.lisp.

Function: decompose-arg (arg option-type)

Returns base-name,argument

Package

getopt.

Source

main.lisp.

Function: find-option (name options)

Find an option in option list. Handles using unique abbreviations

Package

getopt.

Source

main.lisp.

Function: is-long-option (arg)
Package

getopt.

Source

main.lisp.

Function: is-option-terminator (arg)
Package

getopt.

Source

main.lisp.

Function: is-short-option (arg)
Package

getopt.

Source

main.lisp.

Function: match-option (arg options)

Matches an argument to an option. Returns option-list,option-type,base-name,argument

Package

getopt.

Source

main.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables