-
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
Path completion overrides subparser completion #67
Comments
Interesting... what shell is this on? |
Bash |
I think the reason is that we put the filenames option on the final call to complete: Line 431 in 7f25585
I tried removing it but of course filepath completion won't work when it should in that case. Then I tried reverting this change: and adding the nospace option to complete where the filenames option was before. Now there is file path completion and my original issue with "build" is solved. The problem is that the nospace option affects normal flags as well, not just incomplete paths. So I have to press space a lot. So the current behaviour is:
and
without the nospace option, I'd get a space after completed, even if completed was a directory and I wanted to provide a file within it. This is weird because I added back the -S flag, like I mentioned before:
|
Cannot reproduce anymore. Not sure what causes the difference from before but one change is a newer Ubuntu version, and possibly a new bash version as a result of that. Closing. |
Nope, spoke too soon. Sorry about that. My CWD didn't have a folder named "build" as I had thought. When I create the folder I still see the bug. Re-opening. Reproduced on two different Ubuntu versions. 23.10 and 22.10. |
My application has a subparser called "build" and the application is generally used inside a directory that contains another directory named "build". I want the subparser to be completed right after the application, like this:
but instead, I get:
That is, there's an unwanted slash at the end, as if it tries to complete the directory. I haven't added shtab.FILE or shab.DIR to the base parser
The text was updated successfully, but these errors were encountered: