summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/MIME/zsh-mime-handler6
1 files changed, 5 insertions, 1 deletions
diff --git a/Functions/MIME/zsh-mime-handler b/Functions/MIME/zsh-mime-handler
index 7245c20e2..24e5184fc 100644
--- a/Functions/MIME/zsh-mime-handler
+++ b/Functions/MIME/zsh-mime-handler
@@ -76,13 +76,14 @@ suffix=${suffix#*.}
 
 local handler flags no_sh no_bg arg bg_flag="&"
 integer i
-local -a exec_asis hand_nonex
+local -a exec_asis hand_nonex exec_never
 
 # Set to a list of patterns which are ignored and executed as they are,
 # despite being called for interpretation by the mime handler.
 # Defaults to executable files, which ensures that they are executed as
 # they are, even if they have a suffix.
 zsh-mime-contexts -a $suffix execute-as-is exec_asis || exec_asis=('*(*)' '*(/)')
+zsh-mime-contexts -a $suffix execute-never exec_never
 
 # Set to a list of patterns for which the handler will be used even
 # if the file doesn't exist on the disk.
@@ -125,6 +126,9 @@ fi
 for pattern in $exec_asis; do
   files=(${dirpref}${~pattern})
   if [[ -n ${files[(r)$1]} ]]; then
+    for pattern in $exec_never; do
+      [[ ${1:A} = ${~pattern} ]] && break 2
+    done
     if (( list )); then
       for (( i = 1; i <= $#; i++ )); do
 	(( i == 1 )) || print -n " "