22305: no default for pine-directory

unposted: a couple of small doc fixes
This commit is contained in:
Peter Stephenson 2006-02-28 11:57:18 +00:00
parent be09a6eba9
commit 36e3a1735a
5 changed files with 39 additions and 14 deletions

View file

@ -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:

View file

@ -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[@]}"

View file

@ -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))(

View file

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

13
README
View file

@ -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