* PATCH: account for eglibc in _pick_variant patterns
@ 2012-11-11 21:59 Oliver Kiddle
0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2012-11-11 21:59 UTC (permalink / raw)
To: Zsh workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-11 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11 21:59 PATCH: account for eglibc in _pick_variant patterns Oliver Kiddle
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).