about summary refs log tree commit diff
path: root/Functions/MIME
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-06-23 13:34:52 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-06-23 13:34:52 +0000
commit4f9c07dc05d25b8b4abf1d6e9886cebd9b5ed7bf (patch)
tree229bf9ce7341238cab71d01c8c3f65c99e1bea5a /Functions/MIME
parent6763a3cc555fcf216e2be15ab3b866ead0138e0f (diff)
downloadzsh-4f9c07dc05d25b8b4abf1d6e9886cebd9b5ed7bf.tar.gz
zsh-4f9c07dc05d25b8b4abf1d6e9886cebd9b5ed7bf.tar.xz
zsh-4f9c07dc05d25b8b4abf1d6e9886cebd9b5ed7bf.zip
25236: zsh-mime-setup -l arguments
Diffstat (limited to 'Functions/MIME')
-rw-r--r--Functions/MIME/zsh-mime-setup8
1 files changed, 7 insertions, 1 deletions
diff --git a/Functions/MIME/zsh-mime-setup b/Functions/MIME/zsh-mime-setup
index 9a3e69610..0e3a29e56 100644
--- a/Functions/MIME/zsh-mime-setup
+++ b/Functions/MIME/zsh-mime-setup
@@ -37,7 +37,13 @@ if [[ -n $o_list ]]; then
   # so we don't need to search styles for suffixes that aren't
   # handled.  Yet.
   local list_word
-  for suffix in ${(ko)zsh_mime_handlers}; do
+  local -a handlers
+  if (( $# )); then
+    handlers=(${(k)zsh_mime_handlers[(I)${(j.|.)*}]})
+  else
+    handlers=(${(k)zsh_mime_handlers})
+  fi
+  for suffix in ${(o)handlers}; do
       zstyle -s ":mime:.$suffix:" handler list_word ||
         list_word=${zsh_mime_handlers[$suffix]}
       print ${(r.10.)suffix}$list_word