Note why "ps axo comm" is not used in _pnames on Linux.

This commit is contained in:
Ville Skyttä 2009-02-15 18:51:09 +02:00
parent c492f00705
commit 14c641aea5

View File

@ -446,6 +446,8 @@ _pnames()
# containing "/" specially unless -r is given so that wouldn't quite # containing "/" specially unless -r is given so that wouldn't quite
# work either. Perhaps it'd be best to not complete these to anything # work either. Perhaps it'd be best to not complete these to anything
# for now. # for now.
# Not using "ps axo comm" because under some Linux kernels, it
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
COMPREPLY=( $( compgen -W '$( command ps axo command | \ COMPREPLY=( $( compgen -W '$( command ps axo command | \
sed -e "1d; s/ .*//; s:.*/::; s/:$//;" \ sed -e "1d; s/ .*//; s:.*/::; s/:$//;" \
-e "s/^[[(-]//; s/[])]$//" \ -e "s/^[[(-]//; s/[])]$//" \