Speed up process name completion.
This commit is contained in:
parent
27952228d7
commit
81d3c689a5
@ -829,8 +829,8 @@ _pgids()
|
|||||||
[[ $UNAME == SunOS || $UNAME == AIX ]] &&
|
[[ $UNAME == SunOS || $UNAME == AIX ]] &&
|
||||||
_pnames()
|
_pnames()
|
||||||
{
|
{
|
||||||
COMPREPLY=( $( compgen -W '$( command ps -efo comm | \
|
COMPREPLY=( $( compgen -X '<defunct>' -W '$( command ps -efo comm | \
|
||||||
sed -e 1d -e "s:.*/::" -e "s/^-//" -e "s/^<defunct>$//")' -- "$cur" ) )
|
sed -e 1d -e "s:.*/::" -e "s/^-//" | sort -u )' -- "$cur" ) )
|
||||||
} ||
|
} ||
|
||||||
_pnames()
|
_pnames()
|
||||||
{
|
{
|
||||||
@ -842,9 +842,9 @@ _pnames()
|
|||||||
# for now.
|
# for now.
|
||||||
# Not using "ps axo comm" because under some Linux kernels, it
|
# Not using "ps axo comm" because under some Linux kernels, it
|
||||||
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
|
# truncates command names (see e.g. http://bugs.debian.org/497540#19)
|
||||||
COMPREPLY=( $( compgen -W '$( command ps axo command= | \
|
COMPREPLY=( $( compgen -X '<defunct>' -W '$( command ps axo command= | \
|
||||||
sed -e "s/ .*//" -e "s:.*/::" -e "s/:$//" -e "s/^[[(-]//" \
|
sed -e "s/ .*//" -e "s:.*/::" -e "s/:$//" -e "s/^[[(-]//" \
|
||||||
-e "s/[])]$//" -e "s/^<defunct>$//")' -- "$cur" ) )
|
-e "s/[])]$//" | sort -u )' -- "$cur" ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function completes on user IDs
|
# This function completes on user IDs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user