about summary refs log tree commit diff
path: root/Completion/Linux
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2011-08-18 12:48:42 +0000
committerMikael Magnusson <mikachu@gmail.com>2011-08-18 12:48:42 +0000
commitf0eaa5713eca5abfdeacabb1a71159456d1e3539 (patch)
tree3e0ccaa7d81e1e964d245ab47e15694c4a7b7511 /Completion/Linux
parentf7111d33584a54aa28fca5660f25e8a9fecdfb0d (diff)
downloadzsh-f0eaa5713eca5abfdeacabb1a71159456d1e3539.tar.gz
zsh-f0eaa5713eca5abfdeacabb1a71159456d1e3539.tar.xz
zsh-f0eaa5713eca5abfdeacabb1a71159456d1e3539.zip
unposted: move _schedtool to correct dir
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/Command/.distfiles1
-rw-r--r--Completion/Linux/Command/_schedtool25
2 files changed, 26 insertions, 0 deletions
diff --git a/Completion/Linux/Command/.distfiles b/Completion/Linux/Command/.distfiles
index 509330f6b..941e2de3c 100644
--- a/Completion/Linux/Command/.distfiles
+++ b/Completion/Linux/Command/.distfiles
@@ -20,6 +20,7 @@ _modutils
 _mondo
 _pkgtool
 _rpmbuild
+_schedtool
 _sshfs
 _strace
 _tpb
diff --git a/Completion/Linux/Command/_schedtool b/Completion/Linux/Command/_schedtool
new file mode 100644
index 000000000..869f146e3
--- /dev/null
+++ b/Completion/Linux/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