jifunks / botany

command line virtual plant buddy
ISC License
438 stars 32 forks source link

Add autocompletion for logins in the visit prompt #18

Closed Ensiss closed 6 years ago

Ensiss commented 6 years ago

This PR adds loop-based autocompletion for logins when visiting.

When pressing tab, the input is changed to the next login in the list. This repeats until the end of possible completions, where it loops back to what the user initially entered. Backtab (shift+tab) can be used to go backwards through the list.

The list of possible logins is extracted from the garden DB, only when the user actually requests completion.