zackargyle/react-bash

Autocomplete should work with a single letter when unique

Closed this issue · 1 comments

In the example below, I have the public directory, the only directory that starts with a p. But when I try cd p + tab, it doesn't autocomplete. It works if I add a u, but since it's the only item starting with a p the autocomplete should work anyways.

image

Good catch! So it actually is working "correctly", but the current autocomplete implementation was always including commands as well. Since there is was multiple suggestions ['pwd','public'] it was not suggesting one. Made a PR to fix the autocomplete to only include commands if we are autocompleting a single token.
#8