zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: zsh-mime-handler, again
@ 2006-04-11 18:28 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-04-11 18:28 UTC (permalink / raw)
  To: Zsh hackers list

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@csr.com>                  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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-11 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 18:28 PATCH: zsh-mime-handler, again Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).