about summary refs log tree commit diff
path: root/Completion/Unix/Command/_uptime
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_uptime')
-rw-r--r--Completion/Unix/Command/_uptime26
1 files changed, 26 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_uptime b/Completion/Unix/Command/_uptime
new file mode 100644
index 000000000..58b4d991b
--- /dev/null
+++ b/Completion/Unix/Command/_uptime
@@ -0,0 +1,26 @@
+#compdef uptime guptime
+
+local variant
+
+_pick_variant -r variant procps=procps gnu='Free Soft' unix --version
+
+case $variant in
+  procps)
+    _arguments -s -S : \
+      '(: -)'{-h,--help}'[display help information]' \
+      '(: -)'{-V,--version}'[display version information]' \
+      + '(excl)' \
+      {-p,--pretty}'[display uptime in pretty format]' \
+      {-s,--since}'[display date/time of system boot]'
+    return
+    ;;
+  gnu)
+    _arguments -S : \
+      '(: -)--help[display help information]' \
+      '(: -)--version[display version information]' \
+      '1:utmp/wtmp file:_files'
+    return
+    ;;
+  # *BSD, Darwin, Solaris, BusyBox
+  *) _message 'no more arguments'; return 1 ;;
+esac