Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: zsh-mime-handler, again



The new execute-as-is style comes in handy for skipping autocdable
directories that happen to have MIME suffixes.  I've added that to the
default list.  I'll commit a doc fix when it doesn't clash with
the user-defined math function patch.

Index: Functions/MIME/zsh-mime-handler
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/MIME/zsh-mime-handler,v
retrieving revision 1.7
diff -u -r1.7 zsh-mime-handler
--- Functions/MIME/zsh-mime-handler	9 Apr 2006 21:12:38 -0000	1.7
+++ Functions/MIME/zsh-mime-handler	11 Apr 2006 18:12:32 -0000
@@ -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 @@
 # 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

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



Messages sorted by: Reverse Date, Date, Thread, Author