Bug 689180 - perldoc completion dies if MANPAGER is set
Summary: perldoc completion dies if MANPAGER is set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 14
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-20 05:14 UTC by Scott Bronson
Modified: 2011-05-28 21:35 UTC (History)
11 users (show)

Fixed In Version: bash-completion-1.3-4.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 20:22:24 UTC


Attachments (Terms of Use)
patch to fix the perl completions (513 bytes, patch)
2011-03-20 05:14 UTC, Scott Bronson
no flags Details | Diff

Description Scott Bronson 2011-03-20 05:14:40 UTC
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

Comment 1 Ville Skyttä 2011-03-21 16:50:34 UTC
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.

Comment 2 Scott Bronson 2011-04-08 21:55:24 UTC
> 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!

Comment 3 Ville Skyttä 2011-04-09 09:21:44 UTC
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.

Comment 4 Scott Bronson 2011-04-09 14:48:22 UTC
Right on.  Since this has gone for years without complaint I'm sure it's fine to wait for the upstream release.

Comment 5 Fedora Update System 2011-04-15 21:02:53 UTC
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

Comment 6 Fedora Update System 2011-04-15 21:09:44 UTC
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

Comment 7 Fedora Update System 2011-04-15 21:17:07 UTC
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

Comment 8 Fedora Update System 2011-04-15 21:22:57 UTC
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

Comment 9 Fedora Update System 2011-04-20 03:19:37 UTC
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.

Comment 10 Fedora Update System 2011-04-23 20:48:32 UTC
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.

Comment 11 Fedora Update System 2011-05-10 21:41:20 UTC
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

Comment 12 Fedora Update System 2011-05-10 21:43:04 UTC
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

Comment 13 Fedora Update System 2011-05-28 21:34:01 UTC
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.

Comment 14 Fedora Update System 2011-05-28 21:35:26 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.