about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-04-11 18:49:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-04-11 18:49:02 +0000
commit9491c3c754b4fcd1271d98c3eee6fb702e05ae5e (patch)
tree0dce5483cd7921986263d4c6764ccd2d8c836cbd
parent1d25bdbe0ce4e02f046819af16865d66ce2bf23e (diff)
downloadzsh-9491c3c754b4fcd1271d98c3eee6fb702e05ae5e.tar.gz
zsh-9491c3c754b4fcd1271d98c3eee6fb702e05ae5e.tar.xz
zsh-9491c3c754b4fcd1271d98c3eee6fb702e05ae5e.zip
22417: allow autocd with execute-as-is
-rw-r--r--ChangeLog6
-rw-r--r--Functions/MIME/zsh-mime-handler7
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d7ceb320..f1eaaeca4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-11  Peter Stephenson  <pws@csr.com>
+
+	* 22417: Functions/MIME/zsh-mime-handler: also
+	allow autocd to work and add *(/) to the default
+	execute-as-is.
+
 2006-04-11  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* 22415: Doc/Makefile.in: changed how we call install-info so that
diff --git a/Functions/MIME/zsh-mime-handler b/Functions/MIME/zsh-mime-handler
index 9e736b2cd..52be70618 100644
--- a/Functions/MIME/zsh-mime-handler
+++ b/Functions/MIME/zsh-mime-handler
@@ -25,8 +25,11 @@
 # This note is mostly here so you can work out what I tried to do when
 # it goes horribly wrong.
 
+local autocd
+[[ -o autocd ]] && autocd=autocd
+
 emulate -L zsh
-setopt extendedglob cbases nullglob
+setopt extendedglob cbases nullglob $autocd
 
 # We need zformat from zsh/zutil for %s replacement.
 zmodload -i zsh/zutil
@@ -51,7 +54,7 @@ local -a exec_asis
 # 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.
-zstyle -a $context execute-as-is exec_asis || exec_asis=('*(*)')
+zstyle -a $context execute-as-is exec_asis || exec_asis=('*(*)' '*(/)')
 
 local pattern
 local -a files