about summary refs log tree commit diff
path: root/Completion/Unix/Command/_zpool
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-10-14 23:03:40 +0200
committerOliver Kiddle <opk@zsh.org>2014-10-14 23:04:45 +0200
commit13fc579343b24d298fb8905933b6000d7fcda114 (patch)
treecbc1000696357438714107635f93166bcab76d3a /Completion/Unix/Command/_zpool
parent66320ca93a717467a0ed0d34da4c06257953aa50 (diff)
downloadzsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.gz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.xz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.zip
33467: correct return status on functions and numerous other minor fixes
Diffstat (limited to 'Completion/Unix/Command/_zpool')
-rw-r--r--Completion/Unix/Command/_zpool13
1 files changed, 5 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_zpool b/Completion/Unix/Command/_zpool
index 0f18eefb5..03ebd0642 100644
--- a/Completion/Unix/Command/_zpool
+++ b/Completion/Unix/Command/_zpool
@@ -12,7 +12,7 @@ _zpool() {
 	)
 
 	versions=(
-		${${${(M)"${(f)$(zpool upgrade -v)}":#[[:space:]]#<->*}##[[:space:]]}%%[[:space:]]*}
+		${${${(M)"${(f)$(_call_program versions zpool upgrade -v)}":#[[:space:]]#<->*}##[[:space:]]}%%[[:space:]]*}
 	)
 
 	ro_props=(
@@ -87,15 +87,12 @@ _zpool() {
 
 	if [[ $service == "zpool" ]]; then
 		_arguments -C -A "-*" \
-			'-\?[Help]' \
-			'*::command:->subcmd' && return 0
+			'-\?[show help information]' \
+			'1:subcommand:compadd -a subcmds' \
+			'*:: :->subcmd' && return
 
-		if (( CURRENT == 1 )); then
-			_wanted commands expl "zpool subcommand" compadd -a subcmds
-			return
-		fi
 		service="$words[1]"
-		curcontext="${curcontext%:*}=$service:"
+		curcontext="${curcontext%:*}-$service:"
 	fi
 
 	case $service in