Roland ( & Brian) --
...and then Roland Rosenfeld said...
% On Fri, 25 Aug 2000, David T-G wrote:
%
% > alias me-bigfoot <[EMAIL PROTECTED]> (David @ BigFoot)
%
% As you can see, this is a simple grep output but sed didn't convert it
% to the mutt query format, that's why the above (second) grep wipes
% these lines out.
Gotcha.
%
% m_muttalias only understands the following formats of aliases:
%
% alias foo User Name <foo@bar>
% alias foo foo@bar (User Name)
Aha! Well, that would do it, then :-)
%
% and converts them both to
%
% foo@bar User Name alias foo
%
% Other alias syntax (like your combination of <...> and (...)) isn't
% supported yet, because they don't make much sense to me and I don't
I could probably go about redoing all of my aliases, but I still like the
elm aliases lookup format. Perhaps once I fully make the move to lbdbq
I'll start keeping my aliases in my mutt file only and use lbdbq to do my
queries. Still, though, nobody does comments (anything after a comma in
the alias definition, as in
alias foo = Foo, lots of commentary for me (even here) = [EMAIL PROTECTED]
for example) like elm supported...
% see a canonical way to realize this (if you have patches against
% m_muttalias to work around the problem, let me know).
I'll work one up and forward it on unless I see something from you or
Brian first.
%
% > but the grep -v seems to throw away these results.
%
% Yes, that's intended, because the syntax of these lines isn't
% recognized.
Gotcha.
%
% > SOOOOO... As far as I can read the grep regexp, grep is going to
% > filter out anything like
...
%
% The trick here is the combination of grep, grep, sed, sed, grep -v:
%
% - I first grep selects all lines, which match the search string.
% - The second grep tries to detect alias lines
% - The first sed converts lines with <...> syntax to mutt query format
% - The second sed converts lines with (...) syntax to mutt query format
Oh; I get it!
% - The grep -v wipes out all lines, which are still in the alias
% format. This is necessary, because we need the lines in mutt query
% format and if this conversion isn't possible, wiping out all lines,
% which couldn't be converted, is the only chance.
Yep; that's the key.
%
% If you provide a sed expression which converts aliases in your unusual
% format (without changing other aliases!), I could add it above.
Thanks, as always!
%
% > My question is "why is m_muttalias doing this?" so that I can figure
% > out if I just want to junk that last grep
%
% This isn't a good idea, because converting these lines to mutt query
% format before is necessary.
Hokay. Time to start sedding, then.
%
% > or rewrite it to fit my alias format
%
% Adding a line for your alias format would do the job.
Thanks!
%
% Tschoeeee
%
% Roland
%
% --
% * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
:-D
--
David T-G * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.bigfoot.com/~davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001. There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*
PGP signature