Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _sched



This patch to _sched allows it to complete scheduled jobs for removing.

Oliver

--- Completion/Builtins/_sched.bak	Thu Oct 21 11:24:33 1999
+++ Completion/Builtins/_sched	Thu Oct 21 12:23:37 1999
@@ -1,7 +1,15 @@
 #compdef sched
 
+local expl lines
+
 if [[ CURRENT -eq 2 ]]; then
-  _message 'time specification'
-  return 1
+  if compset -P -; then
+    lines=(${(f)"$(sched)"})
+    _description expl 'scheduled jobs'
+    [[ -z $lines ]] || compadd "$expl[@]" -ld lines - {1..$#lines}
+  else
+    _message 'time specification'
+    return 1
+  fi
 fi
 compset -n 3 && _normal



Messages sorted by: Reverse Date, Date, Thread, Author