readline or editline.
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| aline.c | ||
| aline.h | ||
| ansiterm.h | ||
| LICENSE.md | ||
| Makefile | ||
| README.md | ||
| SECURITY.md | ||
aline
Simple TTY style line editing with last line history.
TTY Line Editing
Aline implements simple TTY style line editing and history for interactive input. GNU readline, BSD libedit, and rlwrap are not supported. See also stty(1).
up ^K Cycle to the previous input line to edit.
down ^L Cycle to the next input line to edit.
left right Cursor left or right within line.
ERASE ^H ^? Erase character before the cursor.
WERASE Erase the previous white space delimited word.
KILL Erase current line input.
EOL ^M ^J Newline submits input line.
EOF End of file.
- Assumes ANSI terminal escape sequences.
readline is predominately Linux and editline for BSD. They provide elaborate emacs and vi command line editing with history, which are fine for large projects, but sometimes they're just too much. aline (not to be confused with the typo alien) is intentionally light weight, providing just the common Unix line editing functions with a small circular line history, typically 16 lines.
The two principle functions are alineInit and alineInput; see aline.c main() for a usage example. This project is a spin-off from Post4.
Test
$ make test
Test aline's line editing and history commands, CTRL+C or CTRL+D to exit.