summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_watch43
1 files changed, 38 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_watch b/Completion/Unix/Command/_watch
index a8d29403f..fff3d56f6 100644
--- a/Completion/Unix/Command/_watch
+++ b/Completion/Unix/Command/_watch
@@ -1,9 +1,42 @@
#compdef watch
-# watch(1) has completely different semantics on freebsd compared to linux, hence:
-case $OSTYPE in
- (freebsd*|dragonfly*) _watch-snoop "$@";;
- (*) _default;;
+local variant ret=1
+local -a context line state state_descr
+local -A opt_args
+
+_pick_variant -r variant procps=procps $OSTYPE --version
+
+case $variant in
+ (procps)
+ _arguments -s -S -A '-*' : \
+ '(: * -)'{-h,--help}'[display help information]' \
+ '(: * -)'{-v,--version}'[display version information]' \
+ '(-b --beep)'{-b,--beep}'[beep on non-zero command exit]' \
+ '(-c --color)'{-c,--color}'[interpret ANSI color/style sequences]' \
+ '(-d --differences)'{-d-,--differences=-}'[highlight changes between updates]::how to highlight:(permanent)' \