Lines 15-21
Link Here
|
15 |
_eselect_binutils () { |
15 |
_eselect_binutils () { |
16 |
local binutilslist |
16 |
local binutilslist |
17 |
if (( $words[(I)(set)] )); then |
17 |
if (( $words[(I)(set)] )); then |
18 |
binutilslist=(${${${(M)${(f)"$(eselect --no-color binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
18 |
binutilslist=(${${${(M)${(f)"$(eselect binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
19 |
_values "available binutils version" $binutilslist[@] && return 0 |
19 |
_values "available binutils version" $binutilslist[@] && return 0 |
20 |
fi |
20 |
fi |
21 |
_values "binutils options" \ |
21 |
_values "binutils options" \ |
Lines 30-36
Link Here
|
30 |
_eselect_kernel () { |
30 |
_eselect_kernel () { |
31 |
local kernellist |
31 |
local kernellist |
32 |
if (( $words[(I)(set)] )); then |
32 |
if (( $words[(I)(set)] )); then |
33 |
kernellist=(${${${(M)${(f)"$(eselect --no-color kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
33 |
kernellist=(${${${(M)${(f)"$(eselect kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
34 |
_values "available kernel version" $kernellist[@] && return 0 |
34 |
_values "available kernel version" $kernellist[@] && return 0 |
35 |
fi |
35 |
fi |
36 |
_values "kenrel options" \ |
36 |
_values "kenrel options" \ |
Lines 44-50
Link Here
|
44 |
_eselect_ctags () { |
44 |
_eselect_ctags () { |
45 |
local ctagslist |
45 |
local ctagslist |
46 |
if (( $words[(I)(set)] )); then |
46 |
if (( $words[(I)(set)] )); then |
47 |
ctagslist=(${${${(M)${(f)"$(eselect --no-color ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
47 |
ctagslist=(${${${(M)${(f)"$(eselect ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
48 |
_values "available ctags version" $ctagslist[@] && return 0 |
48 |
_values "available ctags version" $ctagslist[@] && return 0 |
49 |
fi |
49 |
fi |
50 |
_values "ctags options" \ |
50 |
_values "ctags options" \ |
Lines 59-65
Link Here
|
59 |
_eselect_profile () { |
59 |
_eselect_profile () { |
60 |
local profilelist |
60 |
local profilelist |
61 |
if (( $words[(I)(set)] )); then |
61 |
if (( $words[(I)(set)] )); then |
62 |
profilelist=(${${${(M)${(f)"$(eselect --no-color profile list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
62 |
profilelist=(${${${(M)${(f)"$(eselect profile list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
63 |
_values -w "available profiles" $profilelist[@] \ |
63 |
_values -w "available profiles" $profilelist[@] \ |
64 |
"--force[Forcibly set the symlink]" && return 0 |
64 |
"--force[Forcibly set the symlink]" && return 0 |
65 |
fi |
65 |
fi |
Lines 74-83
Link Here
|
74 |
_eselect_fontconfig () { |
74 |
_eselect_fontconfig () { |
75 |
local fclistenabled fclistdisabled |
75 |
local fclistenabled fclistdisabled |
76 |
if (( $words[(I)(enable)] )); then |
76 |
if (( $words[(I)(enable)] )); then |
77 |
fclistdisabled=(${${${${(M)${(f)"$(eselect --no-color fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
77 |
fclistdisabled=(${${${${(M)${(f)"$(eselect fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
78 |
_values -w ".conf to enable" $fclistdisabled[@] && return 0 |
78 |
_values -w ".conf to enable" $fclistdisabled[@] && return 0 |
79 |
elif (( $words[(I)(disable)] )); then |
79 |
elif (( $words[(I)(disable)] )); then |
80 |
fclistenabled=(${${${(M)${(M)${(f)"$(eselect --no-color fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
80 |
fclistenabled=(${${${(M)${(M)${(f)"$(eselect fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
81 |
_values -w ".conf to disable" $fclistenabled[@] && return 0 |
81 |
_values -w ".conf to disable" $fclistenabled[@] && return 0 |
82 |
fi |
82 |
fi |
83 |
_values "fontconfig options" \ |
83 |
_values "fontconfig options" \ |
Lines 91-97
Link Here
|
91 |
_eselect_opengl () { |
91 |
_eselect_opengl () { |
92 |
local opengllist |
92 |
local opengllist |
93 |
if (( $words[(I)(set)] )); then |
93 |
if (( $words[(I)(set)] )); then |
94 |
opengllist=(${${${(M)${(f)"$(eselect --no-color opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
94 |
opengllist=(${${${(M)${(f)"$(eselect opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
95 |
_values -w "opengl implementations and options" $opengllist[@] \ |
95 |
_values -w "opengl implementations and options" $opengllist[@] \ |
96 |
"--use-old[If an implementationis already set, use that one instead]" \ |
96 |
"--use-old[If an implementationis already set, use that one instead]" \ |
97 |
"--prefix[Set the source prefix]:path:_files -/" \ |
97 |
"--prefix[Set the source prefix]:path:_files -/" \ |
Lines 109-115
Link Here
|
109 |
_eselect_vi () { |
109 |
_eselect_vi () { |
110 |
local vilist |
110 |
local vilist |
111 |
if (( $words[(I)(set)] )); then |
111 |
if (( $words[(I)(set)] )); then |
112 |
vilist=(${${${(M)${(f)"$(eselect --no-color vi list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
112 |
vilist=(${${${(M)${(f)"$(eselect vi list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
113 |
_values -w "vi implementation" $vilist[@] && return 0 |
113 |
_values -w "vi implementation" $vilist[@] && return 0 |
114 |
elif (( $words[(I)(update)] )); then |
114 |
elif (( $words[(I)(update)] )); then |
115 |
_values -w "option" "--if-unset[Do not override existing implementation]" && return 0 |
115 |
_values -w "option" "--if-unset[Do not override existing implementation]" && return 0 |
Lines 130-136
Link Here
|
130 |
"--no-colour[Disable coloured output]" \ |
130 |
"--no-colour[Disable coloured output]" \ |
131 |
"--no-color[Disable coloured output]" |
131 |
"--no-color[Disable coloured output]" |
132 |
) |
132 |
) |
133 |
modnames=(${${${(M)${(f)"$(eselect --no-color list-modules)"}## *}// */}// /}) |
133 |
modnames=(${${${(M)${(f)"$(eselect modules list)"}## *}// */}// /}) |
134 |
|
134 |
|
135 |
if ((CURRENT == 2)); then |
135 |
if ((CURRENT == 2)); then |
136 |
_arguments -s \ |
136 |
_arguments -s \ |
Lines 144-150
Link Here
|
144 |
if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
144 |
if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
145 |
_eselect_$words[2] "$@" |
145 |
_eselect_$words[2] "$@" |
146 |
else |
146 |
else |
147 |
modopts=(${${${(M)${(f)"$(eselect --no-color $words[2] usage)"}## *}// */}// /}) |
147 |
modopts=(${${${(M)${(f)"$(eselect $words[2] usage)"}## *}// */}// /}) |
148 |
_arguments -s \ |
148 |
_arguments -s \ |
149 |
"*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0 |
149 |
"*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0 |
150 |
fi |
150 |
fi |
Lines 155-161
Link Here
|
155 |
if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
155 |
if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
156 |
_eselect_$words[3] "$@" |
156 |
_eselect_$words[3] "$@" |
157 |
else |
157 |
else |
158 |
modopts=(${${${${(M)${(f)"$(eselect --no-color $words[3] usage)"}## *}// */}// /}// *}) |
158 |
modopts=(${${${${(M)${(f)"$(eselect $words[3] usage)"}## *}// */}// /}// *}) |
159 |
_arguments -s \ |
159 |
_arguments -s \ |
160 |
"*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0 |
160 |
"*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0 |
161 |
fi |
161 |
fi |