Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with slashes in autocomplete options #124

Open
devinus opened this issue Mar 2, 2016 · 3 comments
Open

Problems with slashes in autocomplete options #124

devinus opened this issue Mar 2, 2016 · 3 comments

Comments

@devinus
Copy link

devinus commented Mar 2, 2016

Using these options: ['a/b', 'a/boo', 'b/a', 'b/c']

-> % node cli.js
local@cutter~$ send a/b/
a/b  a/boo  b/a  b/c
local@cutter~$ send a/b/

It wont autocomplete the whole string and it's just funky in general. Not how I would expect autocomplete to work.

@enriched
Copy link

👍 I am experiencing this using callback based autocomplete

@bilbercode
Copy link

I have also experienced this issue, I resolved by returning only the post suffix options so the autocomplete would function correctly.

for example


function autocompleteResponse(input, cb) {

   // Autocomplete options logic...
   return cb([
     "b",
     "boo",
     "a",
     "c"
   ]);

}

There is also a bug relating to when the user inputs $ foo/b with the given options of ["baz", "bang"] in that the autocomplete resolution craps out a little and removes the prefix foo from the result.

I have made a pull request to get this fixed, as well as some minor related ;)

dthree added a commit that referenced this issue Apr 9, 2017
Patches #124 Problems with slashes in autocomplete options
@robross0606
Copy link

This still appears to be a problem specifically if the auto-complete returns a single item that has a slash in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants