From 5385a822b6de0fc5a805dfe99f78bdafdd476736 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 17 Jan 2003 09:23:34 +0000 Subject: 18121: add new function for completing e-mail addresses --- Completion/Unix/Command/_elm | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'Completion/Unix/Command/_elm') diff --git a/Completion/Unix/Command/_elm b/Completion/Unix/Command/_elm index 34a30649c..2918a5de0 100644 --- a/Completion/Unix/Command/_elm +++ b/Completion/Unix/Command/_elm @@ -1,9 +1,7 @@ #compdef elm -local curcontext="$curcontext" state line expl suf - -_arguments -C -s \ - '::recipient:->userhost' \ +_arguments -s \ + '::recipient:_email_addresses' \ '-a[use the arrow pointer regardless]' \ '-A+[attach file]:file attachment:_files' \ '-c[check the given aliases only]:*:alias' \ @@ -17,17 +15,4 @@ _arguments -C -s \ '-V[enable sendmail voyeur mode]' \ '-v[display elm version]' \ '-w[write .elm/elmrc]' \ - '-z[start only if new messages]' && 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 + '-z[start only if new messages]' -- cgit 1.4.1