about summary refs log tree commit diff
path: root/Completion/Linux/Command/_ionice
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-09-21 14:22:31 +0000
committerClint Adams <clint@users.sourceforge.net>2008-09-21 14:22:31 +0000
commit05ddfc0cbca6782937b317f7530e5eb850ffd920 (patch)
tree3582facc1d479610b0066e04809b27298f14f496 /Completion/Linux/Command/_ionice
parent5cae0e52071908c71938e418da010d2131c828d1 (diff)
downloadzsh-05ddfc0cbca6782937b317f7530e5eb850ffd920.tar.gz
zsh-05ddfc0cbca6782937b317f7530e5eb850ffd920.tar.xz
zsh-05ddfc0cbca6782937b317f7530e5eb850ffd920.zip
Jörg Sommer: 25702: completions for chrt and ionice commands.
Diffstat (limited to 'Completion/Linux/Command/_ionice')
-rw-r--r--Completion/Linux/Command/_ionice23
1 files changed, 23 insertions, 0 deletions
diff --git a/Completion/Linux/Command/_ionice b/Completion/Linux/Command/_ionice
new file mode 100644
index 000000000..7a4060341
--- /dev/null
+++ b/Completion/Linux/Command/_ionice
@@ -0,0 +1,23 @@
+#compdef ionice
+
+local context state line
+typeset -A opt_args
+
+_arguments \
+  '(* -)-h[display usage information]' \
+  '-p[interpret args as process ID]' \
+  '-c[scheduling class]:class:(( 1\:realtime 2\:best-effort 3\:idle ))' \
+  '-n[scheduling class priority]:class-pririty:((
+    0\:high\ priority
+    {1..6}\:
+    7\:low\ priority
+  ))' \
+  '*::command or pid:->cmd_or_pid' \
+  && return 0
+
+if (( $+opt_args[-p] ))
+then
+    _pids
+else
+    _normal
+fi