I have this perl program to write folder hooks so I can return to
the same place in the mailboxes screen from the index screen,
instead of always to the first line:
#!/usr/bin/perl
use strict;
my @mailboxes = glob("Mail/*");
foreach my $mailbox ( @mailboxes )
{
$mailbox =~ s/^ Mail\/ (.*)$/=$1/x;
print qq{folder-hook $mailbox 'macro index h
<change-folder>?<tab><search>$mailbox<enter>'\n};
}
I source it in /etc/Muttrc with this line:
source /etc/mutt/indexhooks.pl|/
to put output into Muttrc, following the direction in the manual,
If the filename ends with a vertical bar (|), then filename is
considered to be an executable program from which to read input (eg.
source ~bin/myscript|/).
but I was getting this error:
Error in /etc/Muttrc, line 709: /etc/mutt/indexhooks.pl|/:
No such file or directory
source: errors in /etc/Muttrc
Press any key to continue...
I then took off the final slash, and it started working. So, I
think this is a documentation bug.
However, this is on cygwin, so perhaps it is an idiosyncracy
of cygwin, rather than a documentation bug.