Home

Awesome

Readline example in Common Lisp

Example from cl-readline's documentation: https://vindarel.github.io/cl-readline/

It showcases custom completion and keybindings. Type a command (with TAB-completion), and type arguments (with TAB-completion of the choices).

To run the example:

sbcl --script example.lisp

or build an executable:

make build  # and then ./clreadline

(we added handling of a C-c).

See the custom completion: first, type and complete a verb (eat, throw,…). Later words are completed as fruits (orange, banana,…). Type "o<TAB>" and see the completion to "orange" (no dropdown list).

Also type C-o to insert a predefined custom text,

and type an opening paren "(" to insert two parens and move the cursor in-between (using rl:insert-text and rl:backward-char).

Some command line apps using cl-readline:

Please add yours here and/or in readline's wiki!

Changelog

We added: