Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: account for eglibc in _pick_variant patterns
- X-seq: zsh-workers 30793
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: account for eglibc in _pick_variant patterns
- Date: Sun, 11 Nov 2012 22:59:03 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1352671144; bh=7agazY06wMkRD3T0IV4e8lHmI1pmqpkMYZbYEG/kK/k=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:From:To:Subject:Date:Message-ID; b=EO7pMrpTdXzTM1cMAIZxCKvPKnyOezM77i40Nohbkp4TmDmGLBaUoTuks7dECVI0av7GCuQecf+WQp3VeB6Kc2bU4+6e3SCGKF5VE2/CAzVPwVwrxnda9nQPU5GTURNo79W60osznb+ogCsMjAvpMgeHUNc3/f5fzb+O6ra7kcI=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Completion for iconv was broken on Debian, the reason being that Debian
uses eglibc. iconv --version output therefore says EGLIBC instead of
GNU. I checked for other programs in libc-bin and found the same issue
also affected a couple of other completion functons.
Oliver
Index: Completion/Unix/Command/_getent
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_getent,v
retrieving revision 1.2
diff -u -r1.2 _getent
--- Completion/Unix/Command/_getent 9 Dec 2011 14:51:55 -0000 1.2
+++ Completion/Unix/Command/_getent 11 Nov 2012 21:50:30 -0000
@@ -5,12 +5,13 @@
local -a args
typeset -A opt_args
-if _pick_variant -r is_gnu gnu=GNU unix --version; then
+if _pick_variant -r is_gnu gnu='(GNU|EGLIBC)' unix --version; then
args+=(
'(- 1 *)'{-\?,--help}'[display help information]'
'(- 1 *)--usage[display a short usage message]'
'(- 1 *)'{-V,--version}'[display version information]'
{-s,--service=}'[specify service configuration to use]:service:->services'
+ '(-i --no-idn)'{-i,--no-idn}'[disable IDN encoding]'
)
fi
Index: Completion/Unix/Command/_iconv
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_iconv,v
retrieving revision 1.7
diff -u -r1.7 _iconv
--- Completion/Unix/Command/_iconv 18 Aug 2011 14:28:50 -0000 1.7
+++ Completion/Unix/Command/_iconv 11 Nov 2012 21:50:30 -0000
@@ -4,13 +4,13 @@
local LOCPATH="${LOCPATH:-/usr/lib/nls/loc}"
local -U codeset
-if _pick_variant gnu=GNU unix --version; then
+if _pick_variant gnu='(GNU|EGLIBC)' unix --version; then
local exargs="--list -? --help --usage --version -V"
_arguments -C -S -s \
"(-f --from-code $exargs)"{-f+,--from-code=}'[specify code set of input file]:code set:->codeset' \
"(-t --to-code $exargs)"{-t+,--to-code=}'[specify code set for output]:code set:->codeset' \
- '(- 1)--list[list all character code sets]' \
+ '(- 1 -l --list)'{-l,--list}'[list all character code sets]' \
"($exargs)-c[omit invalid characters from output]" \
"(-o --output $exargs)"{-o+,--output=}'[specify output file]:output file:_files' \
"(-s --silent --verbose $exargs)"{-s,--silent}'[suppress warnings]' \
Index: Completion/Unix/Command/_ldd
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ldd,v
retrieving revision 1.3
diff -u -r1.3 _ldd
--- Completion/Unix/Command/_ldd 11 Feb 2012 12:56:16 -0000 1.3
+++ Completion/Unix/Command/_ldd 11 Nov 2012 21:50:30 -0000
@@ -1,12 +1,12 @@
#compdef ldd
-if _pick_variant gnu=GNU solaris --version; then
+if _pick_variant gnu='(GNU|EGLIBC)' solaris --version; then
args=(
'(- *)--version[display version information]'
'(- *)--help[display help information]'
'(-v --verbose)'{-v,--verbose}'[include symbol versioning information]'
'(-d --data-relocs)'{-d,--data-relocs}'[perform data relocations and report missing objects]'
- '(-f --function-relocs)'{-f,--function-relocs}'[perform data/function relocations and report missing objects]'
+ '(-r --function-relocs)'{-r,--function-relocs}'[perform data/function relocations and report missing objects]'
'(-u --unused)'{-u,--unused}'[display any unused objects]'
)
else
Messages sorted by:
Reverse Date,
Date,
Thread,
Author