diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-11-18 09:52:50 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-11-18 09:52:50 +0000 |
commit | 7c4a81113448b4177bd9c35fd5b04b60dcaf35a7 (patch) | |
tree | 35241107804c6996bb58ac0fcd5d3851a11874b1 /Doc/Zsh/contrib.yo | |
parent | cf4e27a129cbb04c8206d9efb41a3b58a558a241 (diff) | |
download | zsh-7c4a81113448b4177bd9c35fd5b04b60dcaf35a7.tar.gz zsh-7c4a81113448b4177bd9c35fd5b04b60dcaf35a7.tar.xz zsh-7c4a81113448b4177bd9c35fd5b04b60dcaf35a7.zip |
29908: make MIME functions handle stacked suffixes
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r-- | Doc/Zsh/contrib.yo | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index b02c61c45..aee0bd7f4 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -2803,6 +2803,23 @@ start with tt(:mime:), with additional components in some cases. It is recommended that a trailing tt(*) (suitably quoted) be appended to style patterns in case the system is extended in future. Some examples are given below. + +For files that have multiple suffixes, e.g. tt(.pdf.gz), where the +context includes the suffix it will be looked up starting with the +longest possible suffix until a match for the style is found. +For example, if tt(.pdf.gz) produces a match for the handler, that +will be used; otherwise the handler for tt(.gz) will be used. Note +that, owing to the way suffix aliases work, it is always required that +there be a handler for the shortest possible suffix, so in this example +tt(.pdf.gz) can only be handled if tt(.gz) is also handled (though +not necessarily in the same way). Alternatively, if no handling +for tt(.gz) on its own is needed, simply adding the command + +example(alias -s gz=zsh-mime-handler) + +to the initialisation code is sufficient; tt(.gz) will not be handled +on its own, but may be in combination with other suffixes. + startitem() kindex(current-shell, MIME style) item(tt(current-shell))( |