about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2011-12-09 14:51:54 +0000
committerMikael Magnusson <mikachu@gmail.com>2011-12-09 14:51:54 +0000
commit45cd289e494db22c177b7a4ecf795b5f0795026c (patch)
tree7b521fd2a8a1a956cbeb1875265578a40f7a6c93
parente3182c18de8f84c2d7eb003f9c731ada5e9a591f (diff)
downloadzsh-45cd289e494db22c177b7a4ecf795b5f0795026c.tar.gz
zsh-45cd289e494db22c177b7a4ecf795b5f0795026c.tar.xz
zsh-45cd289e494db22c177b7a4ecf795b5f0795026c.zip
29876: Update getent completion.
-rw-r--r--ChangeLog7
-rwxr-xr-xCompletion/Unix/Command/_getent5
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dc4fb2d3b..47c6eb930 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-09  Mikael Magnusson  <mikachu@gmail.com>
+
+	* 29876: Completion/Unix/Command/_getent: Update getent completion
+	to work when additional output comes after the databases.
+
 2011-12-08  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 29955 with bits pointed out by Mikael and Bart:
@@ -15679,5 +15684,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5521 $
+* $Revision: 1.5522 $
 *****************************************************
diff --git a/Completion/Unix/Command/_getent b/Completion/Unix/Command/_getent
index 57d2ec256..9644fa35b 100755
--- a/Completion/Unix/Command/_getent
+++ b/Completion/Unix/Command/_getent
@@ -25,8 +25,9 @@ case $state in
   ;;
   databases)
     if [[ $is_gnu = gnu ]]; then
-      databases=( ${=${${(f)"$(_call_program databases $words[1] --help \
-          2>/dev/null)"}[(r)Supported*,-1]}[2,-1]} )
+      databases=( "${(@)${(@f)$(_call_program databases $words[1] --help \
+                   2>/dev/null)}[(r)Supported*,-1]}" )
+      databases=( "${=${(@)databases[2,${(@)databases[(i)]}-1]}}" )
     else
       databases=( passwd group hosts ipnodes services protocols ethers networks netmasks )
     fi