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/X/Command | |
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/X/Command')
-rw-r--r-- | Completion/X/Command/_mozilla | 12 | ||||
-rw-r--r-- | Completion/X/Command/_netscape | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/Completion/X/Command/_mozilla b/Completion/X/Command/_mozilla index 30cfe8dc9..4f129476f 100644 --- a/Completion/X/Command/_mozilla +++ b/Completion/X/Command/_mozilla @@ -58,13 +58,7 @@ if [[ "$state" = "remote" ]]; then fi ;; mailto*) - compset -P "*," - if compset -P '*@'; then - _wanted hosts expl 'remote host name' _hosts -q -S, && ret=0 - else - compset -S "@*" || suf="@" - _wanted users expl 'login name' _users -q -S "$suf" && ret=0 - fi + _email_addresses -s, -c && ret=0 ;; *) compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}" @@ -83,13 +77,15 @@ if [[ "$state" = "urls" ]]; then license logo memory-cache mozilla plugins && ret=0 elif compset -P news: ; then _newsgroups "$@" && ret=0 + elif compset -P mailto: ; then + _email_addresses -c && ret=0 else _tags prefixes while _tags; do while _next_label prefixes expl 'URL prefix' "$@"; do _urls "$expl[@]" && ret=0 compset -S '[^:]*' - compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0 + compadd -S '' "$expl[@]" about: news: mailto: mocha: javascript: && ret=0 done (( ret )) || return 0 done diff --git a/Completion/X/Command/_netscape b/Completion/X/Command/_netscape index 617ec37de..a6f9ac3fc 100644 --- a/Completion/X/Command/_netscape +++ b/Completion/X/Command/_netscape @@ -48,13 +48,7 @@ if [[ "$state" = "remote" ]]; then fi ;; mailto*) - compset -P "*," - if compset -P '*@'; then - _wanted hosts expl 'remote host name' _hosts -q -S, && ret=0 - else - compset -S "@*" || suf="@" - _wanted users expl 'login name' _users -q -S "$suf" && ret=0 - fi + _email_addresses -s, -c && ret=0 ;; *) compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}" @@ -77,13 +71,15 @@ if [[ "$state" = "urls" ]]; then image-cache license logo memory-cache mozilla plugins && ret=0 elif compset -P news: ; then _newsgroups "$@" && ret=0 + elif compset -P mailto: ; then + _email_addresses -c && ret=0 else _tags prefixes while _tags; do while _next_label prefixes expl 'URL prefix' "$@"; do _urls "$expl[@]" && ret=0 compset -S '[^:]*' - compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0 + compadd -S '' "$expl[@]" about: news: mailto: mocha: javascript: && ret=0 done (( ret )) || return 0 done |