about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Command/_sched21
1 files changed, 21 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_sched b/Completion/Zsh/Command/_sched
new file mode 100644
index 000000000..82b8a7c91
--- /dev/null
+++ b/Completion/Zsh/Command/_sched
@@ -0,0 +1,21 @@
+#compdef sched
+
+local expl lines disp
+
+if [[ CURRENT -eq 2 ]]; then
+  if compset -P -; then
+    lines=(${(f)"$(sched)"})
+    if zstyle -T ":completion:${curcontext}:jobs" verbose; then
+      disp=( -ld lines )
+    else
+      disp=()
+    fi
+    [[ -z $lines ]] || _wanted jobs expl 'scheduled jobs' \
+                           compadd "$disp[@]" - {1..$#lines}
+    return
+  else
+    _message 'time specification'
+    return 1
+  fi
+fi
+compset -n 3 && _normal