Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: multiple mailbox lines in muttrc



> The _mutt_cache is initialized by grepping your .muttrc (or the file that
> you name in the $muttrc variable, which you should set somewhere in your
> .zshrc file if it's not ~/.muttrc) for the string "mailboxes" and then
> throwing away the first word of the result.  So it could be coming from

For one thing, this should have been a grep "^mailboxes", lest
it try to interpret comments or other cruft.  For another thing,
who needs grep?  :)

Index: Completion/User/_mailboxes
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_mailboxes,v
retrieving revision 1.2
diff -u -r1.2 _mailboxes
--- Completion/User/_mailboxes	2000/05/31 09:38:26	1.2
+++ Completion/User/_mailboxes	2000/06/22 02:22:57
@@ -65,7 +65,8 @@
 
 
   [[ -f ${~muttrc:-.} ]] &&
-    _mutt_cache=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
+    _mutt_cache=( ${${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} )
+
 
   _mbox_cache=( ${~maildirectory}/*(^/) )
   _pine_cache=( ${~pinedirectory}/**/*(.) )



Messages sorted by: Reverse Date, Date, Thread, Author