about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-07-21 17:48:21 +0200
committerOliver Kiddle <opk@zsh.org>2016-07-21 17:49:13 +0200
commit82119d8d1723667ddc77d760d2be448beef7c972 (patch)
tree1fca2a36c82e87a5b9cf5103309a263442827324
parentf117edfabebda4c21622ff38ea9e55bf01b2f8ab (diff)
downloadzsh-82119d8d1723667ddc77d760d2be448beef7c972.tar.gz
zsh-82119d8d1723667ddc77d760d2be448beef7c972.tar.xz
zsh-82119d8d1723667ddc77d760d2be448beef7c972.zip
38904: fix return status in _normal and functions erroneously using it for default completion
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Core/_normal4
-rw-r--r--Completion/Unix/Command/_iostat2
-rw-r--r--Completion/Unix/Command/_top2
4 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3af6b342b..e37cb392f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-07-21  Oliver Kiddle  <opk@zsh.org>
 
+	* 38904: Completion/Base/Core/_normal,
+	Completion/Unix/Command/_iostat, Completion/Unix/Command/_top:
+	fix return status in _normal and functions erroneously using
+	it for default completion
+
 	* 38894: Marko Myllynen: Completion/Unix/Command/_libvirt:
 	completion for virt-admin and libvirt client/server IDs/names
 
diff --git a/Completion/Base/Core/_normal b/Completion/Base/Core/_normal
index 539b3781f..dd607d2b2 100644
--- a/Completion/Base/Core/_normal
+++ b/Completion/Base/Core/_normal
@@ -30,9 +30,9 @@ if [[ CURRENT -eq 1 ]]; then
   curcontext="${curcontext%:*:*}:-command-:"
 
   comp="$_comps[-command-]"
-  [[ -n "$comp" ]] && eval "$comp" && ret=0
+  [[ -n "$comp" ]] && eval "$comp" && return
 
-  return ret
+  return 1
 fi
 
 _set_command
diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_iostat
index 7dc33a1fc..6653a5da4 100644
--- a/Completion/Unix/Command/_iostat
+++ b/Completion/Unix/Command/_iostat
@@ -129,4 +129,4 @@ if (( $#args )); then
   return
 fi
 
-_normal
+_default
diff --git a/Completion/Unix/Command/_top b/Completion/Unix/Command/_top
index 10c0e3481..0259c236a 100644
--- a/Completion/Unix/Command/_top
+++ b/Completion/Unix/Command/_top
@@ -98,4 +98,4 @@ if (( $#specs )); then
   return
 fi
 
-_normal
+_default