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