diff --git a/contrib/mplayer b/contrib/mplayer index 80880b97..e5a6f6e5 100644 --- a/contrib/mplayer +++ b/contrib/mplayer @@ -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()