25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

_mutt-wizard.zsh 1.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #compdef mw
  2. _arguments \
  3. '1:flag:->flags' \
  4. '*:: :->args'
  5. case "$state" in
  6. flags)
  7. local -a opts
  8. opts=(
  9. '-a:Add an email address'
  10. '-l:List email addresses configured'
  11. '-d:Remove an already added address'
  12. '-D:Force remove account without confirmation'
  13. '-y:Sync mail for account by name'
  14. '-Y:Sync mail for all accounts'
  15. '-t:Toggle automatic mailsync every <number> minutes'
  16. '-T:Toggle automatic mailsync every 10 minutes'
  17. '-r:order account numbers'
  18. )
  19. _describe 'flags' opts
  20. ;;
  21. args)
  22. case $line[1] in
  23. -a)
  24. _alternative \
  25. 'args: :((
  26. -u\:"Account login name if not full address"
  27. -n\:"Real name to be on the email account"
  28. -i\:"IMAP/POP server address"
  29. -I\:"IMAP/POP server port"
  30. -s\:"SMTP server address"
  31. -S\:"SMTP server port"
  32. -x\:"Password for account (recommended to be in double quotes)"
  33. -P\:"Pass Prefix (prefix of the file where password is stored)"
  34. -p\:"Add for a POP server instead of IMAP."
  35. -X\:"Delete an account'"'"'s local email too when deleting."
  36. -o\:"Configure address, but keep mail online."
  37. -f\:"Assume typical English mailboxes without attempting log-on."
  38. ))'
  39. ;;
  40. -D|-y)
  41. _values 'email list' $(mw -l | cut -f2) 2>/dev/null
  42. esac
  43. esac