Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 109697

Summary: app-portage/genlop: bash-completion does not support all command-line arguments
Product: Gentoo Linux Reporter: Renat Golubchyk <RAGermany>
Component: New packagesAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: normal CC: darkside, ka0ttic
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: support for more command-line arguments
changes 'cd' to 'builtin cd'
combined patch for genlop 0.30.7

Description Renat Golubchyk 2005-10-18 05:37:53 UTC
genlop understands more arguments than the bash_completion script now supports.
I added them (and cleaned up the code a little :-) )

Reproducible: Always
Steps to Reproduce:
e.g. type "genlop --d" and hit TAB
Actual Results:  
nothing changes

Expected Results:  
genlop --date
Comment 1 Renat Golubchyk 2005-10-18 05:45:48 UTC
Created attachment 70930 [details, diff]
support for more command-line arguments

This patch adds support for one-letter arguments and --date.

It fixes the "unary operator expected" bug. I got that message every time I hit
TAB. The bug happened here:
  if [ ${portagedir} = "" ]

Cleaned up the code a little, so that it uses bash-internal [[ ... ]] instead
of [ ... ] for conditions.
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-10-18 07:10:14 UTC
genlop has it's own bash completion from upstream so reassigning this to the
genlop maintainers.
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-10-18 07:14:39 UTC
btw, while I'm here, one thing that's always bugged me about their completion is
they use 'cd' instead of 'builtin cd'.  Otherwise folks who have cd redefined to
display stuff upon entering a directory (todo lists in my case) get their
completion messed up due to the ouput. Can we get that fixed as well?
Comment 4 Renat Golubchyk 2005-10-18 07:32:43 UTC
Created attachment 70941 [details, diff]
changes 'cd' to 'builtin cd'
Comment 5 Renat Golubchyk 2005-10-18 07:36:15 UTC
(In reply to comment #3)
> btw, while I'm here, one thing that's always bugged me about their completion is
> they use 'cd' instead of 'builtin cd'.  Otherwise folks who have cd redefined to
> display stuff upon entering a directory (todo lists in my case) get their
> completion messed up due to the ouput. Can we get that fixed as well?

I'm wondering, is it possible to define a global alias cd='builtin cd' instead
of writing 'builtin cd' in every completion function? It should be seen only by
all the bash_completion scripts, of course.
Comment 6 Renat Golubchyk 2007-06-12 11:36:58 UTC
Created attachment 121795 [details, diff]
combined patch for genlop 0.30.7

I've updated the patches to the latest version (0.30.7) of genlop.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-02-09 05:18:42 UTC
(In reply to comment #6)
> Created an attachment (id=121795) [details]
> combined patch for genlop 0.30.7
> 
> I've updated the patches to the latest version (0.30.7) of genlop.
> 

Thanks for the patch Renet. I'm not sure why this has not been addressed by the tools-portage team. Here is a friendly poke, as it probably slipped through the cracks :)
Comment 8 Paul Varner (RETIRED) gentoo-dev 2013-01-19 20:28:13 UTC
Thanks for the patch, released in genlop-0.30.9