readline
readline copied to clipboard
Readline is a pure go(golang) implementation for GNU-Readline kind library
Go version `1.21.8`. Goland version `2024.1.4`. readline version `v1.5.1` Sample code using `example/readline-demo/readline-demo.go` If you don't configure `Stdin` in `readline.Config` build, you won't be able to input the After manually...
Im trying to use this to get autocomplete through a socket connection, something like this: ```go var completer = readline.NewPrefixCompleter( readline.PcItem("version"), ) func (c *Console) consoleHandler(conn net.Conn) { defer conn.Close()...
when I use: echo "some" | readline-cli the program will not prompt to let me input data again. Any idea to support pipeline stdin? thank you.
- 1 Press Tab after FROM, autocomplete schema, it works. ```sql // "schema." is PcItemDynamic callback returned. SELECT * FROM schema. ``` - 2 Continue to press Tab for the...
The history file [gets created with default permissions](https://github.com/chzyer/readline/blob/fcb4d7d9a9f653462a7adf557fb1f931f00391f2/history.go#L69) (before applying umask) of `0666`, which, assuming a default umask of 022, leaves the history file world readable. This could result in...
Painting only at pos==0 and then moving the character to the beginning of that placeholder does not work well as the first character gets overwritten with the " \b" at...
For example, when I type or paste`select host() \n`, I hope to handle it directly when encounter`\n`, but when I directly paste the text `select\nhost()\n`, I hope to not handle...
I don't know how I got this. panic: runtime error: slice bounds out of range [:1] with capacity 0 goroutine 19 [running]: github.com/chzyer/readline.(*RuneBuffer).RuneSlice(0x1400030fb80, 0x1) /Users/jawren/go/pkg/mod/github.com/chzyer/[email protected]/runebuf.go:111 +0x22c github.com/chzyer/readline.(*opCompleter).CompleteRefresh(0x140003624d0) /Users/jawren/go/pkg/mod/github.com/chzyer/[email protected]/complete.go:201 +0xc0 github.com/chzyer/readline.(*Operation).ioloop(0x140003623f0)...
When I type Ctrl+W at the first word, the entire line is deleted rather than just the first word https://github.com/user-attachments/assets/64f8246e-354c-4790-834f-516e77857819
Fixes https://github.com/chzyer/readline/issues/258