unix-options

unix-options is a library for processing Unix-style command-line arguments. Can act as a simple Getopt for Lisp or can automatically bind values passed in from the CLI. Ordinary usage is as simple as specifying which variables you need to be set from the command-line.

For example:

(asdf:oos 'asdf:load-op 'unix-options)
(use-package 'unix-options)

(with-cli-options () (alpha beta delta &parameters file) (print alpha) (print beta) (print delta) (print file) (print free))

(quit)

$ sample-script.lisp -affile.txt --beta -- file2.txt
-> T
-> T
-> NIL
-> "file.txt"
-> ("file2.txt")
$

The repository is on github: http://github.com/astine/unix-options

It is asdf installable from Download ASDF package from http://www.beggersandbuskers.com/unix-options.tar.gz


system programming command-line options parser

This page is linked from: evol  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively