nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] .mh_profile question

2015-01-31 17:36:25
    Date:        Sat, 31 Jan 2015 14:06:21 -0800
    From:        Jon Steinhart <jon(_at_)fourwinds(_dot_)com>
    Message-ID:  
<201501312206(_dot_)t0VM6LSx009308(_at_)darkstar(_dot_)fourwinds(_dot_)com>

  | Thanks, that works.  Seems odd to have it work one way but not the other.

This was discussed (for one reason or another, I've forgotten) not all
that long ago ... the profile "parser" is incredibly simple, there is
no quoting or escaping at all - args are split at spaces.

From your earlier message ...


jon(_at_)fourwinds(_dot_)com said:
  | If I put the following
  | scan: -format '%5(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>
  | %02(mon{date})/%02(mday{date})%<{date} %|*%> 
%<(mymbox{from})%<{to}To:%14(deco
  | de(friendly{to}))%>%> %<(zero)%17(decode(friendly{from}))%> 
%(decode{subject})
  | %<{body}<<%{body}>>%>'

  | into my .mh_profile, it says

  | scan: bad message list %>%<{replied}-%?{encrypted}E%|

Look at the error, see that in the -format option you put in .profile, and
then look at the next character...   The quotes do nothing at all (except
get included as part of the format).

If you used the same thing on the command line, it would work, as the
shell's parser is somewhat smarter.

However, unlike what Ralph just said, it turns out that this has nothing
whatever to do with m_getfld() being used to read the profile (it is, but
all that does is read the string given and associate it with the command
name) - it is what happens after that that would need to be changed (the
brkstring() function).

kre


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>