c-bata / go-prompt

Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
https://godoc.org/github.com/c-bata/go-prompt
MIT License
5.27k stars 346 forks source link

[Feature Request] Option to escape special characters or quote strings containing special characters #248

Open brianstrauch opened 2 years ago

brianstrauch commented 2 years ago

Feature Request

A common use of go-prompt is adding autocompletion to CLIs. Occasionally, a CLI will want to autocomplete an argument or flag value with special characters. Right now, rendering these values to the terminal causes syntax errors.

A new option should be created, such that when added to a prompt: