From e66dce41bccc73867efde01958d8d51f11041706 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 19 Feb 2006 21:20:43 +0000 Subject: 22285: assorted fixes: _imagemagick files intro.yo list of other manual pages pick-web-browser: add firefox zsh-mime-setup: list consistent with styles for zsh-mime-handler --- Functions/MIME/zsh-mime-setup | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Functions/MIME/zsh-mime-setup') diff --git a/Functions/MIME/zsh-mime-setup b/Functions/MIME/zsh-mime-setup index 150d4c07f..9a3e69610 100644 --- a/Functions/MIME/zsh-mime-setup +++ b/Functions/MIME/zsh-mime-setup @@ -32,11 +32,19 @@ done if [[ -n $o_list ]]; then - # List and return. + # List and return. Remember that suffixes may be overridden by styles. + # However, we require some sort of standard handler to be present, + # 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 - print ${(r.10.)suffix}${zsh_mime_handlers[$suffix]} - if [[ -n ${zsh_mime_flags[$suffix]} ]]; then - print " flags: ${zsh_mime_flags[$suffix]}" + zstyle -s ":mime:.$suffix:" handler list_word || + list_word=${zsh_mime_handlers[$suffix]} + print ${(r.10.)suffix}$list_word + zstyle -s ":mime:.$suffix:" flags list_word || + list_word=${zsh_mime_flags[$suffix]} + if [[ -n $list_word ]]; then + print " flags: $list_word" fi done return 0 -- cgit v1.2.3