summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Completion/Unix/Type/_mailboxes19
-rw-r--r--Doc/Zsh/compsys.yo5
-rw-r--r--Functions/MIME/zsh-mime-handler6
-rw-r--r--README13
5 files changed, 39 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 66ac3efe6..75b32e60d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-02-28  Peter Stephenson  <pws@csr.com>
+
+	* unposted: Functions/MIME/zsh-mime-handler: typo.
+
+	* unposted: README: doc formats were out of date.
+
+	* 22305 (slightly tweaked): README,
+	Completion/Unix/Type/_mailboxes,  Doc/Zsh/compsys.yo:  no default
+	for pine-directory since that could cause recursive search mayhem.
+
 2006-02-26  Clint Adams  <clint@zsh.org>
 
 	* 22302, 22303: Completion/Debian/Command/_schroot:
diff --git a/Completion/Unix/Type/_mailboxes b/Completion/Unix/Type/_mailboxes
index d3c60790d..bf5c6c2a2 100644
--- a/Completion/Unix/Type/_mailboxes
+++ b/Completion/Unix/Type/_mailboxes
@@ -5,7 +5,7 @@ _mailboxes() {
   local expl ret=1
   local maildirectory pinedirectory
   zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
-  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory || pinedirectory="~/mail"
+  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory
 
   if (( ! $+_mailbox_cache )) then
     _mailbox_cache "$@"
@@ -68,7 +68,7 @@ _mailbox_cache () {
   typeset -aU -g _maildir_cache _mbox_cache _mh_cache _mutt_cache _pine_cache
 
   zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
-  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory || pinedirectory="~/mail"
+  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory
   zstyle -s ":completion:${curcontext}:" muttrc muttrc || muttrc="~/.muttrc"
 
   [[ -f ${~muttrc:-.} ]] &&
@@ -76,7 +76,11 @@ _mailbox_cache () {
     _mutt_cache=( ${=${(Xe)_mc_tmp}} )
 
   _mbox_cache=( ${~maildirectory}/*(^/) )
-  _pine_cache=( ${~pinedirectory}/**/*(.) )
+  if [[ -n $pinedirectory ]]; then
+    _pine_cache=( ${~pinedirectory}/**/*(.) )
+  else
+    _pine_cache=()
+  fi
 
   dirboxes=( ${~maildirectory}/*(/) )
 
@@ -107,7 +111,7 @@ _mua_mailboxes() {
 
   local maildirectory pinedirectory
   zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
-  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory || pinedirectory="~/mail"
+  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory
 
   case "${curcontext}:" in
     (*:elm:*) # I've probably got this wrong, or at least incomplete
@@ -157,10 +161,13 @@ _mua_mailboxes() {
       fi
       ;;
     (*:pine:*)
+      mbox_names=( "${_mbox_cache[@]}"
+		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
       # Pine is like mail but with no leading `+' to disambiguate;
       # any files not in $pinedirectory must be absolute paths.
-      mbox_names=( "${(@)_pine_cache#$~pinedirectory/}" "${_mbox_cache[@]}"
-		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
+      if [[ -n $pinedirectory ]]; then
+	mbox_names+=( "${(@)_pine_cache#$~pinedirectory/}" )
+      fi
       ;;
     (*:tkrat:*) # Has a couple of custom formats I haven't programmed for.
       mbox_names=( "${_mbox_cache[@]}"
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index b4f664e05..2c1929261 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -2039,8 +2039,9 @@ locations it will be used as the default.
 )
 kindex(pine-directory, completion style)
 item(tt(pine-directory))(
-If set, specifies the directory containing PINE mailbox files.  It
-defaults to `tt(~/mail)'.
+If set, specifies the directory containing PINE mailbox files.  There
+is no default, since recursively searching this directory is inconvenient
+for anyone who doesn't use PINE.
 )
 kindex(ports, completion style)
 item(tt(ports))(
diff --git a/Functions/MIME/zsh-mime-handler b/Functions/MIME/zsh-mime-handler
index 0165cc630..b8c6b6925 100644
--- a/Functions/MIME/zsh-mime-handler
+++ b/Functions/MIME/zsh-mime-handler
@@ -6,9 +6,9 @@
 # those, it tries to be a bit cunning about quoting, which
 # can be a nightmare in MIME handling.  If it sees something like
 #   netscape %s
-# and it only has one file to handle (the usual case then it will handle it
-# internally just by appending a file.)
-# 
+# and it only has one file to handle (the usual case) then it will handle it
+# internally just by appending a file.
+#
 # Anything else is handled by passing to sh -c, which is the only think
 # with a high probability of working.  If it sees something with
 # quotes, e.g.
diff --git a/README b/README
index 70625187a..556a88bfe 100644
--- a/README
+++ b/README
@@ -53,6 +53,13 @@ shell handles multibyte characters properly and the appropriate library
 tests can be used.  This change may be reviewed if no such permanent fix
 is forthcoming.
 
+The completion style pine-directory must now be set to use completion
+for PINE mailbox folders; previously it had the default ~/mail.  This
+change was necessary because otherwise recursive directories under
+~/mail were searched by default, which could be a considerable unnecessary
+hit for anyone not using PINE.  The previous default can be restored with:
+  zstyle ':completion:*' pine-directory ~/mail
+
 Documentation
 -------------
 
@@ -91,9 +98,9 @@ Doc/intro.ms	An introduction to zsh in troff format using the ms
 
 For more information, see the website, as described in the META-FAQ.
 
-If you do not have the necessary tools to process these documents,
-PostScript, ASCII, Info and DVI versions are available in the separate
-file zsh-doc.tar.gz at the archive sites listed in the META-FAQ.
+If you do not have the necessary tools to process these documents, PDF,
+Info and DVI versions are available in the separate file zsh-doc.tar.gz at
+the archive sites listed in the META-FAQ.
 
 The distribution also contains a Perl script in Utils/helpfiles which
 can be used to extract the descriptions of builtin commands from the