summaryrefslogtreecommitdiff
path: root/completions/_renice
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-25 23:46:54 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2017-09-25 23:46:54 -0300
commit6d88f1055806932d9291f96847d2b691cccda2cd (patch)
tree0ff79eedaa8a239331256048981deedbd0721965 /completions/_renice
parent059a87a5936cfebfd2d71ab8057002cafb2ea051 (diff)
downloadbash-completion-6d88f1055806932d9291f96847d2b691cccda2cd.tar.gz
New upstream version 2.7upstream/2.7
Diffstat (limited to 'completions/_renice')
-rw-r--r--completions/_renice32
1 files changed, 32 insertions, 0 deletions
diff --git a/completions/_renice b/completions/_renice
new file mode 100644
index 00000000..1f1a6102
--- /dev/null
+++ b/completions/_renice
@@ -0,0 +1,32 @@
+# renice(8) completion -*- shell-script -*-
+
+# Use of this file is deprecated on Linux. Upstream completion is
+# available in util-linux >= 2.23, use that instead.
+
+_renice()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ local command=$1 curopt i=0
+
+ # walk back through command line and find last option
+ while [[ $i -le $cword && ${#COMPREPLY[@]} -eq 0 ]]; do
+ curopt=${words[cword-$i]}
+ case "$curopt" in
+ -u)
+ _allowed_users
+ ;;
+ -g)
+ _pgids
+ ;;
+ -p|$command)
+ _pids
+ ;;
+ esac
+ i=$(( ++i ))
+ done
+} &&
+complete -F _renice renice
+
+# ex: filetype=sh