]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/nsenter
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / nsenter
index ceea6100166aa03e05839c2dc4f4feef56622fd2..ad56f06e4821104a7232480a72e1a09e6c3306d0 100644 (file)
@@ -15,7 +15,7 @@ _nsenter_module()
                        ;;
                '-t'|'--target')
                        local PIDS
-                       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
                        ;;