summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/BSD/Command/_watch-snoop13
-rw-r--r--Completion/Unix/Command/_watch9
2 files changed, 22 insertions, 0 deletions
diff --git a/Completion/BSD/Command/_watch-snoop b/Completion/BSD/Command/_watch-snoop
new file mode 100644
index 000000000..182b6bb34
--- /dev/null
+++ b/Completion/BSD/Command/_watch-snoop
@@ -0,0 +1,13 @@
+#autoload
+
+# watch [-cinotW] [-f snpdev] [tty]
+
+_arguments -w -S -s : \
+  "-c[reconnect on close]" \
+  "-f:snp(4) device: " \
+  "-i[force interactive mode even when stdout is not a tty]" \
+  "-n[disable the ability to switch the watched tty interactively]" \
+  "-o[reconnect on overflow]" \
+  "-t[print date and time at start]" \
+  "-W[allow write access to observed tty]" \
+  ":tty device:_ttys -D"
diff --git a/Completion/Unix/Command/_watch b/Completion/Unix/Command/_watch
new file mode 100644
index 000000000..a8d29403f
--- /dev/null
+++ b/Completion/Unix/Command/_watch
@@ -0,0 +1,9 @@
+#compdef watch
+
+# watch(1) has completely different semantics on freebsd compared to linux, hence:
+case $OSTYPE in
+  (freebsd*|dragonfly*) _watch-snoop "$@";;
+  (*)           _default;;
+esac
+
+# NOTREACHED