From: "Tim Harder" <radhermit@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/zsh-completion:master commit in: /
Date: Sun, 30 Mar 2014 11:00:26 +0000 (UTC) [thread overview]
Message-ID: <1396169081.e35d24bde64e76f326f9f46ea380c0f97db70ee9.radhermit@gentoo> (raw)
commit: e35d24bde64e76f326f9f46ea380c0f97db70ee9
Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 30 08:44:41 2014 +0000
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sun Mar 30 08:44:41 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=e35d24bd
_eselect: don't duplicate common values
---
_eselect | 49 ++++++++++++++++---------------------------------
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/_eselect b/_eselect
index 9cc28a5..37a71a8 100644
--- a/_eselect
+++ b/_eselect
@@ -1,15 +1,19 @@
#compdef eselect
+
+common_values=(
+ "help[Display help text]"
+ "usage[Display usage information]"
+ "version[Display version information]"
+)
+
_eselect_env () {
if (( $words[(I)(update)] )); then
_values "update options" \
"makelinks[force updating of links]" \
"noldconfig[Do not alter the ld.so cache or configuration]" && return 0
fi
- _values "env options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- 'update[Collect environment variables from all scripts]' && return 0
+ _values "env options" $common_values \
+ 'update[Collect environment variables from all scripts in /etc/env.d/]' && return 0
}
_eselect_binutils () {
@@ -18,10 +22,7 @@ _eselect_binutils () {
binutilslist=(${${${(M)${(f)"$(eselect --color=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/})
_values "available binutils version" $binutilslist[@] && return 0
fi
- _values "binutils options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "binutils options" $common_values \
"list[List all installed version of binutils]" \
"show[Print the currently active binutils version]" \
"set[Activate one of the installed binutils]" && return 0
@@ -33,10 +34,7 @@ _eselect_kernel () {
kernellist=(${${${(M)${(f)"$(eselect --color=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/})
_values "available kernel version" $kernellist[@] && return 0
fi
- _values "kenrel options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "kenrel options" $common_values \
"list[List available kernel symlink targets]" \
"show[Show the current kernel symlink]" \
"set[Set a new kernel symlink target]" && return 0
@@ -47,10 +45,7 @@ _eselect_ctags () {
ctagslist=(${${${(M)${(f)"$(eselect --color=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/})
_values "available ctags version" $ctagslist[@] && return 0
fi
- _values "ctags options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "ctags options" $common_values \
"list[List available ctags symlink targets]" \
"show[Show the current target of the ctags symlink]" \
"update[Automatically update the ctags symlink]" \
@@ -63,10 +58,7 @@ _eselect_profile () {
_values -w "available profiles" $profilelist[@] \
"--force[Forcibly set the symlink]" && return 0
fi
- _values "profile options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "profile options" $common_values \
"list[List available profile symlink targets]" \
"show[Show the current make.profile symlink]" \
"set[Set a new profile symlink target]" && return 0
@@ -80,10 +72,7 @@ _eselect_fontconfig () {
fclistenabled=(${${${(M)${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
_values -w ".conf to disable" $fclistenabled[@] && return 0
fi
- _values "fontconfig options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "fontconfig options" $common_values \
"list[List available fontconfig .conf files]" \
"disable[Disable specified fontconfig .conf file(s)]" \
"enable[Enable specified fontconfig .conf file(s)]" && return 0
@@ -98,10 +87,7 @@ _eselect_opengl () {
"--dst-prefix[Set the destination prefix]:path:_files -/" \
"--impl-headers[Override global headers with ones provided by this profile]" && return 0
fi
- _values "opengl options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "opengl options" $common_values \
"list[List the available OpenGL implementations]" \
"set[Select the OpenGL implementation]" \
"show[Print the current OpenGL implementation]" && return 0
@@ -114,10 +100,7 @@ _eselect_vi () {
elif (( $words[(I)(update)] )); then
_values -w "option" "--if-unset[Do not override existing implementation]" && return 0
fi
- _values "vi options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
+ _values "vi options" $common_values \
"list[List available vi implementations]" \
"set[Set a new vi implementation provider]" \
"show[Show the current vi implementation]" \
next reply other threads:[~2014-03-30 11:00 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-30 11:00 Tim Harder [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-17 14:48 [gentoo-commits] proj/zsh-completion:master commit in: / Vadim Misbakh-Soloviov
2015-04-28 12:07 Vadim A. Misbakh-Soloviov
2014-12-20 23:39 Tim Harder
2014-12-18 16:59 Tim Harder
2014-11-23 21:35 Vadim A. Misbakh-Soloviov
2014-11-15 9:03 Tim Harder
2014-11-15 8:40 Tim Harder
2014-08-30 10:19 Vadim A. Misbakh-Soloviov
2014-08-30 10:19 Vadim A. Misbakh-Soloviov
2014-08-26 18:51 Vadim A. Misbakh-Soloviov
2014-08-26 4:46 Vadim A. Misbakh-Soloviov
2014-08-25 16:13 Vadim A. Misbakh-Soloviov
2014-08-25 12:41 Vadim A. Misbakh-Soloviov
2014-08-25 12:41 Vadim A. Misbakh-Soloviov
2014-08-25 11:26 Vadim A. Misbakh-Soloviov
2014-03-30 11:00 Tim Harder
2014-03-30 11:00 Tim Harder
2014-03-30 11:00 Tim Harder
2014-03-30 11:00 Tim Harder
2014-03-30 11:00 Tim Harder
2014-03-30 11:00 Tim Harder
2014-03-29 8:38 Tim Harder
2014-03-29 2:35 Tim Harder
2014-03-29 1:41 Tim Harder
2014-03-29 1:41 Tim Harder
2014-03-29 1:41 Tim Harder
2014-03-28 19:46 Tim Harder
2014-03-28 18:59 Tim Harder
2014-03-28 18:59 Tim Harder
2014-03-28 18:59 Tim Harder
2014-03-28 18:42 Tim Harder
2014-03-28 18:36 Tim Harder
2014-03-28 18:18 Tim Harder
2014-03-28 18:18 Tim Harder
2014-01-24 1:29 Tim Harder
2014-01-24 1:05 Tim Harder
2014-01-24 1:05 Tim Harder
2014-01-24 1:05 Tim Harder
2013-02-07 20:15 Tim Harder
2013-02-07 20:15 Tim Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396169081.e35d24bde64e76f326f9f46ea380c0f97db70ee9.radhermit@gentoo \
--to=radhermit@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox