summaryrefslogtreecommitdiffstats
path: root/completions/_renice
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:14:42 +0000
commit0bc58b66a4850cdb8458a86c3d9a2fc81de82aa3 (patch)
treeea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/_renice
parentInitial commit. (diff)
downloadbash-completion-0bc58b66a4850cdb8458a86c3d9a2fc81de82aa3.tar.xz
bash-completion-0bc58b66a4850cdb8458a86c3d9a2fc81de82aa3.zip
Adding upstream version 1:2.11.upstream/1%2.11upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 0000000..a416744
--- /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 <= cword && ${#COMPREPLY[@]} == 0)); do
+ curopt=${words[cword - i]}
+ case "$curopt" in
+ -u)
+ _allowed_users
+ ;;
+ -g)
+ _pgids
+ ;;
+ -p | "$command")
+ _pids
+ ;;
+ esac
+ ((i++))
+ done
+} &&
+ complete -F _renice renice
+
+# ex: filetype=sh