diff options
author | Oliver Kiddle <opk@zsh.org> | 2017-10-07 22:26:51 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2017-10-07 22:26:51 +0200 |
commit | 69fcc22dc84e8411870ba8f2a4c876e223ad2a08 (patch) | |
tree | 1ccdeb6677938ae9f23ec0a55ed59f5045a26a56 /Completion/Unix/Command/_timeout | |
parent | e49aabc13a858c636146f6744ac25b3e741763ff (diff) | |
download | zsh-69fcc22dc84e8411870ba8f2a4c876e223ad2a08.tar.gz zsh-69fcc22dc84e8411870ba8f2a4c876e223ad2a08.tar.xz zsh-69fcc22dc84e8411870ba8f2a4c876e223ad2a08.zip |
41823: new completions for some GNU coreutils utilities
Diffstat (limited to 'Completion/Unix/Command/_timeout')
-rw-r--r-- | Completion/Unix/Command/_timeout | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_timeout b/Completion/Unix/Command/_timeout new file mode 100644 index 000000000..0e6d057b3 --- /dev/null +++ b/Completion/Unix/Command/_timeout @@ -0,0 +1,19 @@ +#compdef timeout gtimeout + +local args + +if [[ $service = g* || $OSTYPE != *bsd* ]]; then + # GNU coreutils as opposed to Free/NetBSD implementation + args=( + '(- *)--help[display usage information]' + '(- *)--version[display version information]' + ) +fi + +_arguments -S -A "-" $args \ + '--preserve-status[always exit with the same status as command even if it times out]' \ + "--foreground[don't propagate timeout to the command children]" \ + '(-s --signal)'{-s,--signal}'[specify the signal to send on timeout]:signal:_signals' \ + '(-k --kill-after)'{-k,--kill-after}'[followup first signal with SIGKILL if command persists after specified time]:time:time' \ + '1: :_guard "[0-9.]#([smhd]|)" duration' \ + '*:::command:_normal' |