peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.05k stars 132 forks source link

Problem: wrap a NewCli #134

Closed jievince closed 4 years ago

jievince commented 4 years ago

when I wrap newLiner into a function, auto-completions shows some bug. when I type TAB, it doesn't do a completion but a real TAB(4 spaces). image

jievince commented 4 years ago

image

peterh commented 4 years ago

defer line.Close() in newCli is closing line. We should probably panic when you call line.Prompt after closing line.