-
Notifications
You must be signed in to change notification settings - Fork 34
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
Directory/file completion broken for files/dirs with spaces #74
Labels
Comments
Yup, looks like a bug |
casperdcl
added a commit
that referenced
this issue
Jun 17, 2022
casperdcl
added a commit
that referenced
this issue
Jun 17, 2022
Should be fixed in |
Thank you! It works :) |
casperdcl
added a commit
to brentyi/shtab
that referenced
this issue
Oct 29, 2022
casperdcl
added a commit
to brentyi/shtab
that referenced
this issue
Oct 29, 2022
casperdcl
added a commit
to brentyi/shtab
that referenced
this issue
Oct 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
If I use
shtab.DIRECTORY
orshtab.FILE
and try to complete a directory with spaces in the name, I just get a jumble of words as suggestions and the directory name isn't completed.How to reproduce
Here is the relevant part of the python code
Create a directory with spaces in the name:
$ mkdir "dir with many spaces" $ ls dir with many spaces
Completion without typing part of the word first yields a list of the words in the directory name:
Nothing is completed when pressing tab.
Add the start of the directory name:
Same result.
More info
Compgen, seems to handle it just fine:
Here's a relevant part of the generated completion script:
So I can't see where it goes wrong. Seems to work fine when I do it manually. I'm happy to test stuff if you have suggestions.
The text was updated successfully, but these errors were encountered: