bash-completion
bash-completion copied to clipboard
fix(man): avoid duplicated man page and dir completions
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 https://github.com/scop/bash-completion/issues/420
Draft: I'm not sure I'm happy with this. Let's discuss in #420.