From 13fc579343b24d298fb8905933b6000d7fcda114 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 14 Oct 2014 23:03:40 +0200 Subject: 33467: correct return status on functions and numerous other minor fixes --- Completion/Unix/Command/_zpool | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Completion/Unix/Command/_zpool') 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 -- cgit 1.4.1