summaryrefslogtreecommitdiffstats
path: root/bash-completion/prlimit
diff options
context:
space:
mode:
authorSami Kerola2017-08-26 14:45:13 +0200
committerKarel Zak2017-08-30 11:21:57 +0200
commit75c5f4a516079cf0ddc1896f80c2d56e211f1f50 (patch)
treeba26be983c16254c9eec8f1a761a75a306895c54 /bash-completion/prlimit
parenthwclock: remove bool type definition (diff)
downloadkernel-qcow2-util-linux-75c5f4a516079cf0ddc1896f80c2d56e211f1f50.tar.gz
kernel-qcow2-util-linux-75c5f4a516079cf0ddc1896f80c2d56e211f1f50.tar.xz
kernel-qcow2-util-linux-75c5f4a516079cf0ddc1896f80c2d56e211f1f50.zip
bash-completion: simplify pid listing
Changing directory in subshell does not effect parent process, so this is better and possibly quicker way to list pids. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/prlimit')
-rw-r--r--bash-completion/prlimit2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-completion/prlimit b/bash-completion/prlimit
index f5e00bb16..fc60c6461 100644
--- a/bash-completion/prlimit
+++ b/bash-completion/prlimit
@@ -6,7 +6,7 @@ _prlimit_module()
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-p'|'--pid')
- PIDS=$(for I in /proc/[0-9]*; do echo ${I##"/proc/"}; done)
+ PIDS=$(cd /proc && echo [0-9]*)
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;