summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_timeout
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_timeout')
-rw-r--r--Completion/Unix/Command/_timeout15
1 files changed, 7 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_timeout b/Completion/Unix/Command/_timeout
index 9c7f1a004..f1961012d 100644
--- a/Completion/Unix/Command/_timeout
+++ b/Completion/Unix/Command/_timeout
@@ -2,14 +2,13 @@
local args
-if [[ $service = g* || $OSTYPE != *(freebsd|netbsd|openbsd)* ]]; then
- # GNU coreutils or DFly as opposed to Free/Net/OpenBSD implementation
- args=(
- '(-v --verbose)'{-v,--verbose}'[indicate when signal is sent upon timeout]'
- '(- *)--help[display usage information]'
- '(- *)--version[display version information]'
- )
-fi
+[[ $service = g* || $OSTYPE != *(netbsd|openbsd)* ]] && args=(
+ '(-v --verbose)'{-v,--verbose}'[indicate when signal is sent upon timeout]'
+)
+[[ $service = g* || $OSTYPE != *(#i)(dragonfly|(free|net|open)bsd)* ]] && args+=(
+ '(- *)--help[display usage information]'
+ '(- *)--version[display version information]'
+)
_arguments -S -A "-" $args \
'--preserve-status[always exit with the same status as command even if it times out]' \