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

Bug 171381

Summary: zsh-completion for eselect
Product: Gentoo Hosted Projects Reporter: David Durrleman <dualmoo>
Component: eselectAssignee: Gentoo eselect Team <eselect>
Status: RESOLVED FIXED    
Severity: enhancement CC: baptiste.daroussin, usata
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: a zsh completion function for eselect
a better zsh completion function for eselect
Version without sed

Description David Durrleman 2007-03-18 20:31:55 UTC
zsh-completion currently doesn't support eselect.

I have written an _eselect function that does the work. I will attach it to this bug.

It doesn't support every options of eselect (e.g the "--global" in "eselect bashcomp list --global"), but it supports as much as the bash-completion equivalent does.

Please comment, and if you find it acceptable, include it in the zsh-completion package.

Reproducible: Always

Steps to Reproduce:
1. run zsh
2. type eselect <tab>
Actual Results:  
file completion occurs

Expected Results:  
eselect modules completion should have occurred
Comment 1 David Durrleman 2007-03-18 20:32:53 UTC
Created attachment 113708 [details]
a zsh completion function for eselect
Comment 2 David Durrleman 2007-03-19 02:20:44 UTC
Created attachment 113749 [details]
a better zsh completion function for eselect

I rewrote it because it was badly written. Here it is.
Comment 3 Mike Kelly (RETIRED) gentoo-dev 2007-03-29 08:45:39 UTC
Mamoru, how does this script look to you? Would you want to include it in the main zsh-completion package? Or would you rather we package it with eselect?
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-08-24 16:38:30 UTC
poke
Comment 5 Bapt 2007-10-29 15:30:26 UTC
The code is not good because, it doesn't work at least on gentoo/freebsd because of the sed command,

I'll try to remove sed and use a pure zsh way to do the job.

Anyway, I think this should be incorporated in zsh-completion, because zsh-completion already provides the completion for most of the gentoo tools.
Comment 6 Bapt 2007-10-29 16:17:55 UTC
Created attachment 134650 [details]
Version without sed

Here is a new version based on David's one which avoid the use of sed.

Also remove the french header :).

please test it (I can only test on gentoo/freebsd)

In zsh completion function, it is better to use built-in function each time it is possible (sed for example is not always portable)
Comment 7 Saleem Abdulrasool (RETIRED) gentoo-dev 2008-01-11 05:52:11 UTC
Added with 20080110