chzyer / readline

Readline is a pure go(golang) implementation for GNU-Readline kind library
MIT License
2.08k stars 275 forks source link

Is there a way to read multi-line input? #147

Closed junyu-w closed 6 years ago

junyu-w commented 6 years ago

Not sure if this is something achievable at this moment so this could either be an inquiry or a feature reqeust:

I used readline in my project corgi, and I have found that when I paste a multiline input like

docker run -p 2181:2181 -p 9092:9092 \
--env ADVERTISED_HOST="172.17.0.1" \
--env ADVERTISED_PORT=9092 \
--env NUM_PARTITIONS="2" \
--env TOPICS="topic1,topic2" \
spotify/kafka

only the first line docker run -p 2181:2181 -p 9092:9092 \ was read.

Any idea about how to solve this?

junyu-w commented 6 years ago

found this https://github.com/chzyer/readline/blob/master/example/readline-multiline/readline-multiline.go, closing this issue