diff --git a/completions/xmllint b/completions/xmllint index 8095dae5..64f53c26 100644 --- a/completions/xmllint +++ b/completions/xmllint @@ -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