about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Zsh/Command/.distfiles1
-rw-r--r--Completion/Zsh/Command/_schedtool25
3 files changed, 30 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3427e05f1..4fe7b9ced 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 	* 29681: Src/Zle/zle_refresh.c: consistently use [] to access
 	region_highlights.
 
+	* 29682: Completion/Zsh/Command/.distfiles,
+	Completion/Zsh/Command/_schedtool: new _schedtool completer.
+
 2011-08-16  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* 29650: Src/jobs.c: don't lose the the time info after a
@@ -15275,5 +15278,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5432 $
+* $Revision: 1.5433 $
 *****************************************************
diff --git a/Completion/Zsh/Command/.distfiles b/Completion/Zsh/Command/.distfiles
index 6feec496d..3981f74cc 100644
--- a/Completion/Zsh/Command/.distfiles
+++ b/Completion/Zsh/Command/.distfiles
@@ -23,6 +23,7 @@ _print
 _prompt
 _read
 _sched
+_schedtool
 _set
 _setopt
 _source
diff --git a/Completion/Zsh/Command/_schedtool b/Completion/Zsh/Command/_schedtool
new file mode 100644
index 000000000..869f146e3
--- /dev/null
+++ b/Completion/Zsh/Command/_schedtool
@@ -0,0 +1,25 @@
+#compdef schedtool
+
+local curcontext="$curcontext" line state ret=1
+
+_arguments -C \
+  '(-p    -F -R -B -I -D -M)-N[for SCHED_NORMAL]' \
+  '(   -N    -R -B -I -D -M)-F[for SCHED_FIFO]' \
+  '(   -N -F    -B -I -D -M)-R[for SCHED_RR]' \
+  '(-p -N -F -R    -I -D -M)-B[for SCHED_BATCH]' \
+  '(   -N -F -R -B    -D -M)-I[for SCHED_ISO]' \
+  '(-p -N -F -R -B -I    -M)-D[for SCHED_IDLEPRIO]' \
+  '(   -N -F -R -B -I -D   )-M[for manual mode; raw number for POLICY]:raw policy number' \
+  '(   -N       -B    -D   )-p[usually 1-99; only for FIFO, RR or ISO]:static priority' \
+  '-a[cpu affinity]:mask or list' \
+  '-n[set niceness to NICE_LEVEL]:priority' \
+  '-e[start COMMAND with specified policy/priority]:program: _command_names -e:*::program arguments: _normal' \
+  '-v[be verbose]' \
+  '*:processes:->processes' && ret=0
+
+if [[ -n "$state" ]]; then
+  _alternative \
+    'processes:: _pids' && ret=0
+fi
+
+return ret