diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-01-17 09:23:34 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-01-17 09:23:34 +0000 |
commit | 5385a822b6de0fc5a805dfe99f78bdafdd476736 (patch) | |
tree | 5349ab762783b8831cd63a718de149639d3b63de /Completion/Unix/Command/_mail | |
parent | 1e7c463fd951b1446f219b5ac54295496755b359 (diff) | |
download | zsh-5385a822b6de0fc5a805dfe99f78bdafdd476736.tar.gz zsh-5385a822b6de0fc5a805dfe99f78bdafdd476736.tar.xz zsh-5385a822b6de0fc5a805dfe99f78bdafdd476736.zip |
18121: add new function for completing e-mail addresses
Diffstat (limited to 'Completion/Unix/Command/_mail')
-rw-r--r-- | Completion/Unix/Command/_mail | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/Completion/Unix/Command/_mail b/Completion/Unix/Command/_mail index 82a3a59d0..90c75359d 100644 --- a/Completion/Unix/Command/_mail +++ b/Completion/Unix/Command/_mail @@ -1,24 +1,9 @@ -#compdef mail mailx Mail mush zmail nail +#compdef mail mailx=mail Mail=mail mush zmail nail=mail -local curcontext="$curcontext" state line expl suf - -_arguments -C -s \ +_arguments -s \ '(-f -u)*-b[specify a BCC recipient]:BCC recipient:->userhost' \ '(-f -u)*-c[specify a CC recipient]:CC recipient:->userhost' \ '(-b -c -u -s *)-f+[specify mail folder]:mailbox:_mailboxes' \ '(-f -u)-s+[specify a subject]:subject:' \ "(-b -c -f -s *)-u+[read specified user's mail]:user:_users" \ - '(-f -u)*:recipient:->userhost' && return 0 - -if [[ "$state" = userhost ]]; then - if compset -P '*@'; then - _description hosts expl 'remote host name' - _hosts "$expl[@]" && return 0 - else - compset -S '@*' || suf='@' - _description users expl 'login name' - _users "$expl[@]" -q -S "$suf" && return 0 - fi -fi - -return 1 + "(-f -u)*:recipient:_email_addresses -n $service" |