feature request: tab complete suggestions dropdown
Right now, the tab complete requires that you tab through to see options. fmt.+tab,tab,tab,tab,shift+tab. That is a fantastic start. It would be even more awesome if a dropdown showed up or similar so you can see a list of autocomplete suggestions. Great for discoverability.
gomacro> fmt.Print<tab>
[Print Println Printf]
(with an underline on the current position, so underlined Print)
I agree it would be useful, but AFAIK the line editing and code completion library github.com/peterh/liner currently used by gomacro does not support that.
If you have a suggestion for an alternative library with more features, you're welcome - it's something I'd rather not implement manually in gomacro...
The tcell golang lib might have something.
You may modify line 62 in base/readline.go
from
func MakeTtyReadline(historyfile string) (TtyReadline, error) {
tty := TtyReadline{liner.NewLiner()}
to
func MakeTtyReadline(historyfile string) (TtyReadline, error) {
line := liner.NewLiner()
line.SetTabCompletionStyle(liner.TabPrints)
tty := TtyReadline{line}
This will make tab completion of github.com/peterh/liner behaves similar to BASH.
However, it's nowhere as good as a drop-down that's similar in IPython.