-
Notifications
You must be signed in to change notification settings - Fork 383
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
man xyz stays xy if directory with same name present #420
Comments
Reproduced, interesting. |
A real world example: Ubuntu switched from deb to snap for browser packages (firefox, chromium), so users almost inevitably have |
If a directory with the same name as an already found man page candidate from manpath is present, they both end up in completions as a duplicate with the trailing slash included. To work around, skip file based completion altogether when a man page from manpath is among found candidates. A workaround for the workaround, i.e. "forcing" file based completion, is to prefix the argument with a `./`. Closes #420
I don't have good ideas offhand how to fix this. Getting rid of the duplicate would be fairly easy, but it'd get rid of the command, leaving only the dir with the trailing slash present. I think this is not what people would generally expect. We could opt to not completing filenames if we've found some completions already. PR #787 implements that, at the expense of not doing filename completions at all if a matching man page from manpath has already been found. I'm not entirely happy with that either, because it will hurt also the vast majority of use cases where there are no problematic duplicates present. |
A workaround to force filename completion is |
correctly becomes
However
The text was updated successfully, but these errors were encountered: