dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Fix for autocomplete things beginning with / and make it work still for things without / #179

Open mattiasrunge opened 8 years ago

mattiasrunge commented 8 years ago

When returning an array of matches to autocomplete which begins with / it ignored the result. If trying to autocomplete "/t" with result [ "/test/" ] the match was discarded. Though trying to autocomplete "t" with [ "test/" ] would give the expected result.

This fix makes both cases work.

dthree commented 7 years ago

Thanks. Can you add a test for this?

milesj commented 7 years ago

@mattiasrunge You around to add a test?

mattiasrunge commented 7 years ago

Could maybe do it, but don't have time currently so it will be a while before I can help, sorry.