<commit_before>_xbps_parse_help() {
	local IFS line word

	$1 --help 2>&1 | while IFS=$'\n' read -r line; do
		[[ $line == *([ $'\t'])-* ]] || continue

		IFS=$' \t,='
		for word in $line; do
			[[ $word == -* ]] || continue
			printf -- '%s\n' $word
		done
	done | sort | uniq
}

_xbps_all_packages() {
	xbps-query -Rs "$1*" | sed 's/^... \([^ ]*\)-.* .*/\1/'
}

_xbps_installed_packages() {
	xbps-query -l | sed 's/^.. \([^ ]*\)-.* .*/\1/'
}

_xbps_all_reply() {
	COMPREPLY=( $( compgen -W '$(_xbps_all_packages "$1")' -- "$1") )
}

_xbps_installed_reply() {
	COMPREPLY=( $( compgen -W '$(_xbps_installed_packages)' -- "$1") )
}

_xbps_complete() {
	local cur prev words cword

	_init_completion || return

	if [[ "$cur" == -* ]]; then
		COMPREPLY=( $( compgen -W '$( _xbps_parse_help "$1" )' -- "$cur") )
		return
	fi

	local common='-C|--config|-r|--rootdir'
	local morecommon="$common|-c|--cachedir"

	local modes='auto manual hold unhold'
	local props='architecture
		automatic-install
		build-date
		build-options
		conflicts
		homepage
		install-date
		install-script
		installed_size
		license
		maintainer
		metafile-sha256
		packaged-with
		pkgver
		preserve
		provides
		remove-script
		replaces
		repository
		shlib-provides
		shlib-requires
		short_desc
		source-revisions
		state'
<commit_msg>data/xbps.bash: add more xbps-query properties.<commit_after>_xbps_parse_help() {
	local IFS line word

	$1 --help 2>&1 | while IFS=$'\n' read -r line; do
		[[ $line == *([ $'\t'])-* ]] || continue

		IFS=$' \t,='
		for word in $line; do
			[[ $word == -* ]] || continue
			printf -- '%s\n' $word
		done
	done | sort | uniq
}

_xbps_all_packages() {
	xbps-query -Rs "$1*" | sed 's/^... \([^ ]*\)-.* .*/\1/'
}

_xbps_installed_packages() {
	xbps-query -l | sed 's/^.. \([^ ]*\)-.* .*/\1/'
}

_xbps_all_reply() {
	COMPREPLY=( $( compgen -W '$(_xbps_all_packages "$1")' -- "$1") )
}

_xbps_installed_reply() {
	COMPREPLY=( $( compgen -W '$(_xbps_installed_packages)' -- "$1") )
}

_xbps_complete() {
	local cur prev words cword

	_init_completion || return

	if [[ "$cur" == -* ]]; then
		COMPREPLY=( $( compgen -W '$( _xbps_parse_help "$1" )' -- "$cur") )
		return
	fi

	local common='-C|--config|-r|--rootdir'
	local morecommon="$common|-c|--cachedir"

	local modes='auto manual hold unhold'
	local props='architecture
		archive-compression-type
		automatic-install
		build-date
		build-options
		conf_files
		conflicts
		filename-sha256
		filename-size
		homepage
		install-date
		install-msg
		install-script
		installed_size
		license
		maintainer
		metafile-sha256
		packaged-with
		pkgver
		preserve
		provides
		remove-msg
		remove-script
		replaces
		repository
		shlib-provides
		shlib-requires
		short_desc
		source-revisions
		state'

{'fraction_non_alphanumeric': 0.18720465285350782, 'fraction_numerical': 0.010541621228644129, 'mean_word_length': 3.125937031484258, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3164888', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1081, 'n_words': 234}