1 skip sed run for ps output filtering as ps itself can omit the headers
4 Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
6 --- bash-completion/bash_completion~ 2009-05-24 01:07:50.000000000 +0300
7 +++ bash-completion/bash_completion 2009-05-24 01:12:42.638288264 +0300
12 - COMPREPLY=( $( compgen -W '$( command ps axo pid | sed 1d )' -- $cur ) )
13 + COMPREPLY=( $( compgen -W '$( command ps axo pid= )' -- $cur ) )
16 # This function completes on process group IDs.
21 - COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
22 + COMPREPLY=( $( compgen -W '$( command ps axo pgid= )' -- $cur ))
25 # This function completes on process names.
28 # Not using "ps axo comm" because under some Linux kernels, it
29 # truncates command names (see e.g. http://bugs.debian.org/497540#19)
30 - COMPREPLY=( $( compgen -W '$( command ps axo command | \
31 - sed -e "1d; s/ .*//; s:.*/::; s/:$//;" \
32 + COMPREPLY=( $( compgen -W '$( command ps axo command= | \
33 + sed -e "s/ .*//; s:.*/::; s/:$//;" \
34 -e "s/^[[(-]//; s/[])]$//" \
35 -e "s/^<defunct>$//")' \