Using app-shells/bash-completion-config-0.8-r2 and app-portage/genlop-0.30.5, when i use the tab to autocomplete my query, that's the resoult: genlop -t bash-comp{here I hit tab}bash: [: =: unary operator expected letion-config Then if I hit return, it show me correctly info about "bash-completion-config" package. The problem is not in bash_completion_config becouse this is the only module that act in this way
The problem is in /usr/share/bash-completion/genlop on line 20. It looks like this: if [ ${portagedir} = "" ]; then But it should look like this: if [ "${portagedir}" = "" ]; then Or this: if [ -z "${portagedir}" ]; then Make that change and then source the file.
Both your solutions work great! Just remeber to give env-update && source /etc/profile once you have edited the file for testing the solution. A little boring the fact that now you have to digit the family of the package and not only its name. But this is another story :-) Thank you stuart
I try and don't work for me
I try and don't work for me. I still have the message: -bash: [: =: unary operator expected
The whole portagedir assignment/check for emptiness/default value could be reduced to: portagedir="$( portageq portdir )" This will use whatever is in make.conf or default (/usr/portage) by itself. As for the fact you need to go through category, yeah it's boring, it should probably copy out the generic gentoo (emerge) bashcomp which completes package names alone :)
*** Bug 158841 has been marked as a duplicate of this bug. ***
*** Bug 168195 has been marked as a duplicate of this bug. ***
genlop has been moved into gentoo's svn per permission from the original authors to take over maintainership. The fix for this bug has been added to svn, thanks!