xmllint: Use _parse_help().

This commit is contained in:
Ville Skyttä 2011-05-08 22:18:03 +03:00
parent 622d2bd25f
commit 3d366255a2

View File

@ -35,9 +35,8 @@ _xmllint()
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( xmllint --help 2>&1 | \
sed -ne "s/^[[:space:]]*\(--[^[:space:]:]*\).*/\1/p" ) \
-o' -- "$cur" ) )
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
COMPREPLY=( "${COMPREPLY[@]%:}" )
return 0
fi