all repos — minline @ e9197ce86354f8e157949cd433c2535e6cf8ae96

A minimalist but highly-customizable line editing library.

Renamed to minline.
h3rald h3rald@h3rald.com
Sun, 30 Jul 2023 20:12:28 +0000
commit

e9197ce86354f8e157949cd433c2535e6cf8ae96

parent

49f726b6b735bed93a989d1608eaffbe6e225e1a

4 files changed, 10 insertions(+), 6 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,3 +1,7 @@

nimcache/ nimline -nimline.html +minline +nimline.exe +minline.exe +*.html +*.css
M README.mdREADME.md

@@ -1,8 +1,8 @@

-# nimline +# minline A line editing library in pure Nim designed to be easy to use and provide a minimal (but useful) set of features to build interactive CLI applications. -*nimline* provides: +*minline* provides: * Basic line editing functionality, move the cursor left and right, delete characters etc. * Support for a simple prompt at the beginning of the line.

@@ -13,11 +13,11 @@ * Customizable line completion.

* Customizable key bindings (i.e. bind a key or a sequence of keys to a Nim proc). * Persistent history management (history entries can be written to a file). -*nimline* does *not* provide: +*minline* does *not* provide: * Support for multiple lines (you will not be able to move to the next line) * Support for Unicode or characters other than ASCII. * Support for colors in the prompt. * Full Emacs or Vi key bindings. -For more information, see [the reference docs](https://h3rald.com/nimline/nimline.html). +For more information, see [the reference docs](https://h3rald.com/minline/minline.html).
M minline.nimminline.nim

@@ -62,7 +62,7 @@ type

Key* = int ## The ASCII code of a keyboard key. KeySeq* = seq[Key] ## A sequence of one or more Keys. KeyCallback* = proc(ed: var LineEditor) {.closure, gcsafe.} ## A proc that can be bound to a key or a key sequence to access line editing functionalities. - LineError* = ref Exception ## A generic nimline error. + LineError* = ref Exception ## A generic minline error. LineEditorError* = ref Exception ## An error occured in the LineEditor. LineEditorMode* = enum ## The *mode* a LineEditor operates in (insert or replace). mdInsert