- _kill(): call _pids rather than duplicate code
- _longopt(): when parsing --help output, pipe stderr through stdout
This commit is contained in:
parent
f91a652220
commit
c1c7ae5797
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05a
|
||||
#
|
||||
# $Id: bash_completion,v 1.244 2002/04/02 08:17:35 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.245 2002/04/02 08:22:27 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -507,7 +507,7 @@ _kill()
|
||||
_signals
|
||||
else
|
||||
# return list of available PIDs
|
||||
COMPREPLY=( $( \ls /proc | grep '^[0-9]\+'| grep ^$cur ) )
|
||||
_pids
|
||||
fi
|
||||
}
|
||||
complete -F _kill kill
|
||||
@ -2092,7 +2092,7 @@ _longopt()
|
||||
fi
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( $1 --help | sed -e '/--/!d' \
|
||||
COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
|
||||
-e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \
|
||||
grep ^$cur | sort -u ) )
|
||||
elif [[ "$1" == @(mk|rm)dir ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user