Use compgen -W instead of grepping $cur.
This commit is contained in:
parent
8a24a283a4
commit
2e66656e68
@ -7,10 +7,9 @@ have mplayer && {
|
||||
_mplayer_options_list()
|
||||
{
|
||||
cur=${cur%\\}
|
||||
COMPREPLY=( $( $1 $2 help 2> /dev/null | \
|
||||
COMPREPLY=( $( compgen -W "$( $1 $2 help 2>/dev/null | \
|
||||
sed -e '1,/^Available/d' | awk '{print $1}' | \
|
||||
sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' | \
|
||||
grep "^$cur" ) )
|
||||
sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' )" -- $cur ) )
|
||||
}
|
||||
|
||||
_mplayer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user