#compdef sendxmpp

# sendxmpp (sendxmpp-rs) — send XMPP messages from the command line.
# The message body is read from stdin; recipients are bare JIDs.

_arguments -s \
  '(-h --help)'{-h,--help}'[show this help message and exit]' \
  '(-c --config)'{-c+,--config=}'[path to config file (default: ~/.config/sendxmpp.toml)]:config file:_files' \
  '(-e --force-pgp -r --raw)'{-e,--force-pgp}'[force OpenPGP encryption for all recipients]' \
  '(-a --attempt-pgp -r --raw)'{-a,--attempt-pgp}'[attempt OpenPGP encryption for all recipients]' \
  '(-r --raw -e --force-pgp -a --attempt-pgp -m --muc)'{-r,--raw}'[send raw XML stream; incompatible with recipients and PGP]' \
  '(-p --presence)'{-p,--presence}'[send a <presence/> after connecting before sending messages]' \
  '(-m --muc -r --raw)'{-m,--muc}'[recipients are Multi-User Chats]' \
  '(-n --nick)'{-n+,--nick=}'[nickname to use in Multi-User Chats]:nickname:_message -e nick "nickname"' \
  '*:recipient JID:_message -e recipients "recipient JID"'
