Created attachment 486435 [details] patch to fix the perl completions If MANPAGER is set, perldoc's completion messes up the terminal This is because the completion script uses "PAGER=/bin/cat man perl" to discover some completion. However, in perldoc, MANPAGER and PERLDOC_PAGER both override PAGER, so setting PAGER to /bin/cat is ignored. The enclosed patch fixes this: it just unsets MANPAGER and PERLDOC_PAGER when generating the completions so the output goes to /bin/cat as intended. How reproducible: 100% Steps to Reproduce: 1. put "MANPAGER=less" into your ~/.bashrc 2. type "perldoc <tab>" 3. watch things go nuts
PERLDOC_PAGER shouldn't have any effect because it's man we're invoking in that part of the code, right? But could you tell me a bit more about your environment, and what exactly happens in it? Setting MANPAGER to /bin/cat makes sense to me, but I'm unable to reproduce any problems with it set to "less". This is F-14, gnome-terminal.
> PERLDOC_PAGER shouldn't have any effect Yes, exactly right. I should not have unset PERLDOC_PAGER. > I'm unable to reproduce any problems with it set to "less" I can't reproduce the problem with /bin/less either. I assume less is being smart about checking its output stream. Try it with vim's view command: MANPAGER="sh -c 'col -bx | view -'" man cat (works) perldoc <tab> (blows up) Thanks for checking this!
Thanks for following up, applied upstream with a minor change (set MANPAGER to /bin/cat just like PAGER instead of setting it to empty): http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=f1b9580b35e180c650f14f971d1e5b6ec5e47f34 Do you think this is something people will run into in common setups? I'm wondering whether it's something that should be addressed with a Fedora bugfix package release or if it can wait until the next upstream bash-completion version is out.
Right on. Since this has gone for years without complaint I'm sure it's fine to wait for the upstream release.
bash-completion-1.3-3.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/bash-completion-1.3-3.fc15
bash-completion-1.3-3.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/bash-completion-1.3-3.fc14
bash-completion-1.3-3.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/bash-completion-1.3-3.el6
bash-completion-1.3-3.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/bash-completion-1.3-3.el5
bash-completion-1.3-3.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
bash-completion-1.3-3.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
bash-completion-1.3-4.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/bash-completion-1.3-4.el6
bash-completion-1.3-4.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/bash-completion-1.3-4.el5
bash-completion-1.3-4.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
bash-completion-1.3-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.