nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Redoing argument processing


From: Ken Hornstein
Subject: Re: [Nmh-workers] Redoing argument processing
Date: Fri, 18 Jan 2013 13:13:42 -0500

>It might be tricky for the entries for mime types and character sets.

You mean like mhshow-show entries in your profile?  I just looked at
that and it turns out those are already run under /bin/sh.  Actually,
what happens there is it's run using /bin/sh -c "exec command" and
there is some extra code when constructing the argument list.  I don't
think that should be changed, as that's sort of special in that we're
dealing with a complete command line built up by the user.

In the cases we're talking about now it's a command line partially provided
by the user, part by nmh.

>This was done to make it easy to run a command for the mime type in an
>xterm setup for the character set. Nowadays, I use a script which
>normally uses iconv but for some commands it passes the character set as
>a parameter (e.g. w3m's -I option). We probably ought to do the iconv
>internally and have a % escape for the input character set.

Yeah, that's on my to-do list as well.

>I'd be tempted to be lazy and not bother with the middle one of those.
>You have to think about tabs and newlines, not just spaces.

Well, I think I'd count newlines (if you could even GET a newline into
a moreproc) as a shell metacharacter.  I could be persuaded to simply
get rid of #2; it may not be worth it.  But I think I'll defer that
decision until a little farther down the line.

>What would you do about trailing whitespace? It probably shouldn't count
>for selecting the second option instead of the first and should just be
>stripped.

Well ... I was thinking of calling brkstring.  If it returns only one
string, then it's pretty much #1.  I'll have to check on what happens
there.

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]