peterh / liner

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

Fall out of tabComplete when only a single completion candidate exists #37

Closed abates closed 9 years ago

abates commented 9 years ago

This change implements tabCompletion for a single candidate as discussed in #36.

If the completer function returns a slice with a single completion candidate in it, then update the prompt with that candidate and return control back to the read loop. It doesn't make sense to go into tab completion for a single item

peterh commented 9 years ago

Thanks for the pull request.