1
1
Fork 0
Editable input library
Go to file
sloum f040d8db6a Adds comments and a call to show cursor 2021-04-03 23:03:16 -07:00
termios Gets many keys working on the keyboard 2021-03-31 23:29:58 -07:00
.gitignore Updates project name and cleans things up 2021-04-01 14:43:48 -07:00
README.md Adds readme and license info 2021-04-03 20:15:57 -07:00
go.mod Adds mod file 2021-04-03 20:17:16 -07:00
qline.go Adds comments and a call to show cursor 2021-04-03 23:03:16 -07:00

README.md

qline

qline provides one function: provide an editable input field to the user along with a prompt and initial data.

Unlike readline, editline, linenoise, etc. there is no history, no word jumping, or other builtin features. Just a simple, navigable, editable line of text with an optional prompt.

Usage

var prompt string = "> "
var default string = "Edit Me"
var in string = qline.GetInput(prompt, default)

Arrow keys, backspace, delete, home, and end all work as one might expect. There are no CTRL keys, no vi mode, etc.

License

qline is available under the MIT license. A copy of which is included as a comment in the sole source code file for this package.