Description of problem: 'man <keyword> <TAB> <TAB>' shows no options. I came across this after installing python3-sphinx which requires Lmod, and which in turn sets MANPATH to "/usr/share/lmod/lmod/share/man::". Version-Release number of selected component (if applicable): bash-completion-2.6-1.fc26.noarch How reproducible: Always. Steps to Reproduce: 1. Install Lmod package or set MANPATH to "blah:", or ":blah", or "blah::". 2. Type in "man dnf <TAB> <TAB>" 3. Unset MANPATH. 4. Repeat #2. Actual results: No output on #2, and correct output on #4. Expected results: A list of options e.g.: omiday ~ $ man dnf dnf dnf.plugin.builddep dnf.plugin.debug dnf.plugin.generate_completion_cache dnf.plugin.repograph dnf.plugin.system-upgrade dnf.automatic dnf.plugin.config_manager dnf.plugin.debuginfo-install dnf.plugin.needs_restarting dnf.plugin.repomanage dnf.conf dnf.plugin.copr dnf.plugin.download dnf.plugin.repoclosure dnf.plugin.reposync Additional info: The following seems to fix it: --- a/usr/share/bash-completion/completions/man +++ b/usr/share/bash-completion/completions/man @@ -53,10 +53,7 @@ _man() return fi - local manpath="$MANPATH" - [[ -z $manpath ]] && \ - manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null ) - [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man" + local manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null ) # determine manual section to search local sect
Fixed upstream in https://github.com/scop/bash-completion/commit/e6a471511dfdc230ff3eed65ccba09b6d7d30262
Can confirm this happens with bash-completion-2.7-2.fc28.noarch. Unfortunately this affects me because ‘Lmod’ (something to do with Lua) sets the MANPATH variable (/usr/share/lmod/lmod/share/man::) for some reason, possibly a bug, but that breaks man completions on the whole server.
Any reason the fix from upstream hasn't been included? It's been 5 months.
Not that I know of. I believe that Siteshwar will have a look once he is back from his trip. Thanks for the reminder!
bash-completion-2.7-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d3744aeca4
bash-completion-2.7-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d3744aeca4
bash-completion-2.7-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
Can this fix be applied to f27 as well, since it has 6+ months until EOL? Having man page completions broken gives bash-completion a bad name. I stumbled across this today. I initially thought it was due to #1545264, until I started digging further and then I saw it was fixed for f28 and rawhide but not f27.