<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>119518</bug_id>
          
          <creation_ts>2006-01-19 01:37 0000</creation_ts>
          <short_desc>genlop &quot;unary operator expected&quot; bug, when use bash autocompletion</short_desc>
          <delta_ts>2007-04-02 11:50:34 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>2.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>deadhead@goodfellow.it</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          <cc>caster@gentoo.org</cc>
    
    <cc>diogot@gmail.com</cc>
    
    <cc>dnas.dnas@gmail.com</cc>
    
    <cc>giorgio@pollycoke.org</cc>
    
    <cc>m.debruijne@matrict.nl</cc>
    
    <cc>mcummings@gentoo.org</cc>
    
    <cc>sawk.ita@gmail.com</cc>
    
    <cc>stu@santa-li.com</cc>
    
    <cc>zagarna@yahoo.com</cc>

      

      
          <long_desc isprivate="0">
            <who>deadhead@goodfellow.it</who>
            <bug_when>2006-01-19 01:37:28 0000</bug_when>
            <thetext>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&apos;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 &quot;bash-completion-config&quot; package. The problem is not in bash_completion_config becouse this is the only module that act in this way</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stu@santa-li.com</who>
            <bug_when>2006-01-20 23:14:32 0000</bug_when>
            <thetext>The problem is in /usr/share/bash-completion/genlop on line 20.  It looks like this:

if [ ${portagedir} = &quot;&quot; ]; then

But it should look like this:

if [ &quot;${portagedir}&quot; = &quot;&quot; ]; then

Or this:

if [ -z &quot;${portagedir}&quot; ]; then

Make that change and then source the file.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>deadhead@goodfellow.it</who>
            <bug_when>2006-01-21 00:57:41 0000</bug_when>
            <thetext>Both your solutions work great! Just remeber to give env-update &amp;&amp; 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>diogot@gmail.com</who>
            <bug_when>2006-03-27 05:29:24 0000</bug_when>
            <thetext>I try and don&apos;t work for me</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>diogot@gmail.com</who>
            <bug_when>2006-03-27 05:30:24 0000</bug_when>
            <thetext>I try and don&apos;t work for me.
I still have the message:

-bash: [: =: unary operator expected</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>caster@gentoo.org</who>
            <bug_when>2006-06-20 05:43:49 0000</bug_when>
            <thetext>The whole portagedir assignment/check for emptiness/default value could be reduced to:

portagedir=&quot;$( portageq portdir )&quot;

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&apos;s boring, it should probably copy out the generic gentoo (emerge) bashcomp which completes package names alone :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2006-12-22 08:27:14 0000</bug_when>
            <thetext>*** Bug 158841 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-02-24 08:46:06 0000</bug_when>
            <thetext>*** Bug 168195 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mcummings@gentoo.org</who>
            <bug_when>2007-04-02 11:50:34 0000</bug_when>
            <thetext>genlop has been moved into gentoo&apos;s svn per permission from the original authors to take over maintainership. The fix for this bug has been added to svn, thanks!</thetext>
          </long_desc>
      
    </bug>

</bugzilla>