1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

25236: zsh-mime-setup -l arguments

This commit is contained in:
Peter Stephenson 2008-06-23 13:34:52 +00:00
parent 6763a3cc55
commit 4f9c07dc05
3 changed files with 20 additions and 3 deletions

View file

@ -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