summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_sleep
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_sleep')
-rw-r--r--Completion/Unix/Command/_sleep25
1 files changed, 25 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_sleep b/Completion/Unix/Command/_sleep
new file mode 100644
index 000000000..677062ab9
--- /dev/null
+++ b/Completion/Unix/Command/_sleep
@@ -0,0 +1,25 @@
+#compdef sleep
+
+local sum inf fraction
+local -a expl units
+
+case $OSTYPE in
+ linux-gnu)
+ args=(
+ -S
+ '--help[display help information]'
+ '--version[display version information]'
+ )
+ ;& # fall-through
+ solaris*)
+ inf="_phony infinity --"
+ ;& # fall-through
+ darwin*|freebsd*)
+ units=( :s:seconds m:minutes h:hours d:days )
+ sum='*'
+ fraction='-f'
+ ;;
+esac
+
+_arguments $args \
+ "${sum}:interval:$inf _numbers $fraction -u seconds interval $units"