Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389725 - app-shells/bash-completion installs a broken perl completion script
Summary: app-shells/bash-completion installs a broken perl completion script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-06 13:27 UTC by Enne Eziarc
Modified: 2016-02-10 22:56 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enne Eziarc 2011-11-06 13:27:34 UTC
The perl bash-completion script tries to access a "helpers/perl" using a relative path, which will never work because it always gets invoked via a symlink from a completely different location.

Reproducible: Always

Steps to Reproduce:
1. eselect bashcomp enable --global perl
2. re-login
3. type "perldoc A<tab>"
Actual Results:  
-bash: /etc/bash_completion.d/helpers/perl: No such file or directory

Expected Results:  
autocomplete list appears

Tried reinstalling bash-completion, but it didn't fix it. Symlinking /usr/share/bash-completion/helpers/ into /etc/bash_completion.d/ does, but that defeats the whole point of having an eselect-bashcomp.
Comment 1 Martin von Gagern 2013-03-08 21:44:56 UTC
Perhaps you can drop a "readlink" into that perl script. Or hardcode the path to these helper scripts, as it is known at the distro level, so why bother with fancy tricks?

After hardcoding the path, I get
bash: /usr/share/bash-completion/helpers/perl: Permission denied
So you should fix the execute bit of that file as well.
Comment 2 Alex Efros 2013-04-05 11:00:38 UTC
This solve helper issue too:

  # ln -s /usr/share/bash-completion/helpers/ /etc/bash_completion.d/
  # chmod +x /usr/share/bash-completion/helpers/perl

There is one more issue with perl completion - at /usr/share/bash-completion/perl:115:

  '$( PAGER=/bin/cat man perl |  \

should be changed to:

  '$( PAGER=/bin/cat /usr/bin/man perl |  \

because if user have own ~/bin/man wrapper (for example, one which use Vim to show man pages with syntax highlight and ease navigation) then attempt to autocomplete result in running vim instead of man and break everything.
Comment 3 Alexander Tsoy 2013-07-16 08:22:38 UTC
This should be fixed in app-shells/bash-completion-2.1-r1
Comment 4 Enne Eziarc 2014-05-11 19:32:07 UTC
Removed the 1.3 version number from the summary as 2.1 is also broken. It fails to install the "helpers" directory at all, so that symlink workaround no longer works.
Comment 5 Enne Eziarc 2016-02-10 22:56:40 UTC
2.1_p20141224-r1 seems to work for me (and I've double-checked there's no stray workarounds from old versions), so closing this.