# (C) 2011 magicant

# Completion script for the "ssh-add" command.
# Supports OpenSSH 5.6.

function completion/ssh-add {

	typeset OPTIONS ARGOPT PREFIX
	OPTIONS=( #>#
	"c; confirm when authenticating with the identities being added"
	"D; delete all identities"
	"d; delete identities"
	"e:; remove keys from the specified PKCS#11 library"
	"L; print the public keys of the identities in the agent"
	"l; print the fingerprints of the identities in the agent"
	"s:; add keys from the specified PKCS#11 library"
	"t:; specify the lifetime of identities being added in seconds"
	"X; unlock the agent"
	"x; lock the agent"
	) #<#

	command -f completion//parseoptions
	case $ARGOPT in
	(-)
		command -f completion//completeoptions
		;;
	([est])
		;;
	(*)
		complete -P "$PREFIX" -f
		;;
	esac

}


# vim: set ft=sh ts=8 sts=8 sw=8 noet:
