# sshwgpg completion                                                -*- shell-script -*-
# Copyright © 2025 Jean-Jacques Brucker (u4=sRyUhEbNU5OwyLEjfSwaXAe_42.17-002.76) <jjbrucker@foopgp.org>
# Copyright © 2026 Mnème (u5=001777236237.945e_43.30_005.38) <mneme@foopgp.org>
# SPDX-License-Identifier: GPL-3.0-only

# Reuse ssh's completion (in same dir) for everything except our own long options.
source "${BASH_SOURCE//sshwgpg/ssh}"

_comp_cmd_sshwgpg()
{
	local cur="${COMP_WORDS[COMP_CWORD]}"
	if [[ "$cur" == --* ]] ; then
		COMPREPLY=( $(compgen -W "--no-gpg --no-ssh --dry-run --help --version" -- "$cur") )
		return 0
	fi
	_comp_cmd_ssh "$@"
}

complete -F _comp_cmd_sshwgpg sshwgpg
