Skip to content
Command line interface demo.
Roff Shell Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
autom4te.cache
build-aux
.gitignore
AUTHORS
COPYING
ChangeLog
INSTALL
Makefile.am
Makefile.in
NEWS
README
aclocal.m4
autogen.sh
cli.c
cli.h
clidemo.c
config.h.in
configure
configure.ac

README

CLI is a general purpose command line interface library.

CLI allows programmers to define access from command line to
arbitrary functions. Users can then call the functions from command
line without having to modify the program itself. Variadic functions
are supported by giving a negative arity.

CLI is implemented in C using GNU readline.

CLI uses readline only if input is from a tty, otherwise stdio is used
and no prompt is issued.

The library comes along with CLIdemo which is a pretty good example
of how to use CLI from C.


TODO
====

 - Completion. Tab completion of commands is not yet supported.

 - Typed patterns. Instead of just prefix command names, also allow for
   command typed patterns to denote function application. For instance
   "(int) + (int)" denotes infix integer addition.
   See http://dot-do-lang.kmx.io/typa for more information about typed
   patterns.
You can’t perform that action at this time.