From 9491c3c754b4fcd1271d98c3eee6fb702e05ae5e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 11 Apr 2006 18:49:02 +0000 Subject: 22417: allow autocd with execute-as-is --- Functions/MIME/zsh-mime-handler | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Functions/MIME') 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 -- cgit 1.4.1