# shellcheck shell=bash
#########################################################################
#									#
# Author: Copyright (C) 2026  Mark Grant				#
#									#
# Released under the GPLv3 only.					#
# SPDX-License-Identifier: GPL-3.0-only					#
#									#
# Purpose:								#
# Bash completion script.						#
#									#
#########################################################################


_wutconv()
{
	local cur OPTS
	local old_IFS="$IFS"
	local IFS

	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"

	OPTS="-h -u -v -V -w"
	OPTS+=" --help --unix --verbose --version --windows"

	IFS=$'\n'
	compopt -o filenames
	# shellcheck disable=SC2207  # This is _the_ bash completion pattern,
	# so leave it be.
	COMPREPLY=( $(compgen -f -- "${cur}") )
	IFS="$old_IFS"
	# shellcheck disable=SC2207  # This is _the_ bash completion pattern,
	# so leave it be.
	COMPREPLY+=( $(compgen -W "${OPTS[*]}" -- "${cur}") )
	return 0
}
complete -F _wutconv wutconv

