zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: account for eglibc in _pick_variant patterns
Date: Sun, 11 Nov 2012 22:59:03 +0100	[thread overview]
Message-ID: <14964.1352671143@thecus.kiddle.eu> (raw)

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


                 reply	other threads:[~2012-11-11 22:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=14964.1352671143@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.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.
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).