* Mikko Hänninen ([EMAIL PROTECTED]) [000129 14:44]:
> First, let me explain about the = shortcut.  The = gets expanded to the
> contents of $folder whenever it's seen.  So if you set $folder to ~/mail
> (which gets immediately expanded to /home/user/mail or something like
> that), and then have a folder-hook for =mutt, that gets treated as
> "folder-hook /home/user/mail/mutt"  If you leave out the =, you get a
> "folder-hook mutt".

obviously this is not true.  It should be true, but it is not.

His original problem:

<.muttrc>
set folder=~/mail
folder-hook =mutt blah
</.muttrc>

First attempt:
$ mutt -f ~/mail/mutt

Mutt does not execute the folder-hook

Next attempt:
$ mutt -f =mutt

Mutt does execute the folder-hook.

Obviously expansion is not happening the way you expect.  on the first
call, the shell is expanding ~/mail before mutt ever sees it, so it's
just as if he typed "mutt -f /home/blah/mail/mutt" but, mutt obviously
isn't doing this expansion before attempting the match.  I wonder what
would happen if he typed mutt -f "~/mail/mutt"?  Obviously, he would most
likely get an error about the file ("~/mail/mutt") not existing, but
would the hook be executed?

interesting problem, probably will have to go to the source to find the
solution...

jon

-- 
.Jonathan J. Miner------------------Division of Information Technology.
|[EMAIL PROTECTED]                 University Of Wisconsin - Madison|
|608/262.9655                               Room 3149 Computer Science|
`---------------------------------------------------------------------'

 Are you perchance running on a 64-bit machine?
              -- Larry Wall in <[EMAIL PROTECTED]>

Reply via email to