about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Command/_mozilla12
-rw-r--r--Completion/X/Command/_netscape12
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