zsh-workers
 help / color / mirror / code / Atom feed
* _mailboxes and mutt backticks
@ 2000-11-06 14:36 Clint Adams
  2000-11-09 13:28 ` Clint Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2000-11-06 14:36 UTC (permalink / raw)
  To: zsh-workers

In the muttrc, one may use backticks in the 'mailboxes' specification.
On init, mutt passes each string enclosed in backticks to 'sh -c',
and expands the result.

Currently, zsh's _mailboxes does not cope with this.  I applied the
patch below, which does not seem to be an ideal solution.

Also, with or without this patch, and with or without backticks in
my muttrc, my first completion from mutt -f <TAB> is /, which is
not very useful at all.  This does not happen under a vanilla compinit
from zsh -f but I haven't tracked down which style or option is relevant.

--- /usr/share/zsh/functions/_mailboxes	Sun Oct 22 01:52:12 2000
+++ _mailboxes	Sun Nov  5 09:10:06 2000
@@ -62,15 +62,15 @@
 _mailbox_cache () {
   # Depends on $maildirectory and $pinedirectory from _mailboxes!
 
-  local i j muttrc="${muttrc:-~/.muttrc}"
+  local i j _mc_tmp muttrc="${muttrc:-~/.muttrc}"
   local -aU dirboxes
   typeset -aU -g _mailbox_cache
   typeset -aU -g _maildir_cache _mbox_cache _mh_cache _mutt_cache _pine_cache
 
 
   [[ -f ${~muttrc:-.} ]] &&
-    _mutt_cache=( ${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} )
-
+    _mc_tmp=${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} &&
+    _mutt_cache=( ${=${(Xe)_mc_tmp}} )
 
   _mbox_cache=( ${~maildirectory}/*(^/) )
   _pine_cache=( ${~pinedirectory}/**/*(.) )


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: _mailboxes and mutt backticks
  2000-11-06 14:36 _mailboxes and mutt backticks Clint Adams
@ 2000-11-09 13:28 ` Clint Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Clint Adams @ 2000-11-09 13:28 UTC (permalink / raw)
  To: zsh-workers

> Currently, zsh's _mailboxes does not cope with this.  I applied the
> patch below, which does not seem to be an ideal solution.

I've committed this.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-09 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-06 14:36 _mailboxes and mutt backticks Clint Adams
2000-11-09 13:28 ` Clint Adams

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