-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
completion double tab should show rest of the strings #405
Comments
This is not possible because, common string will remove git/.git and completion code can't know about the context of paths, it would require new API maybe callback function that will be called with array of matched strings and user will be able to call echo on that array and remove what he things is correct. |
doubleTab: function(arr) {
this.echo(arr.map(function(completion) {
return completion.replace(/.*\/([^\/]+)\/?$/, '$1');
}));
} |
the API look like this: doubleTab: function(string, arr, echo_command) {
echo_command();
this.echo(arr.map(function(completion) {
return completion.replace(/.*\/([^\/]+)\/?$/, '$1');
}));
} you don't need to call |
Expected behavior
If you have paths that you complete and you returning
path + dir
orpath + file
when press you double tab it should only show file or dir not whole textActual behavior
it show whole paths
Steps to reproduce
git/.git/ git/.github/
and it should display.git/ .github/
The text was updated successfully, but these errors were encountered: