[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] More than one parameters in .mh_profile
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] More than one parameters in .mh_profile |
Date: |
Mon, 28 May 2012 23:08:59 -0400 |
>Could nmh not do with such parameters what perl does for
>system()/exec(), auto-splitting the string? In the off
>chance that someone's installed binaries in a path with
>a space they can escape the space, same as they would in
>a shell...
Sure, it COULD do that. Sounds like you're volunteering to write
the code; great! :-)
In all seriousness ... yeah, that's probably close to an ideal solution,
but it gets complicated quickly in terms of handling quoting (see the
vim example posted earlier). AFAICT there's no library function to handle
shell-style quoting.
Actually ... I see that what perl does is check for shell metacharacters;
if they exist, then the whole thing gets passed off to "sh -c".
Otherwise it's space-splitted and passed directly to execvp(). You
know ... that's actually not that much code to write and we already
have a space-splitting function (brkstring). What do people think
of that as a solution?
--Ken
- [Nmh-workers] More than one parameters in .mh_profile, Aleksander Matuszak, 2012/05/28
- Re: [Nmh-workers] More than one parameters in .mh_profile, Ken Hornstein, 2012/05/28
- Re: [Nmh-workers] More than one parameters in .mh_profile, Jerrad Pierce, 2012/05/28
- Re: [Nmh-workers] More than one parameters in .mh_profile,
Ken Hornstein <=
- Re: [Nmh-workers] More than one parameters in .mh_profile, Jerrad Pierce, 2012/05/28
- Re: [Nmh-workers] More than one parameters in .mh_profile, Ken Hornstein, 2012/05/28
- Re: [Nmh-workers] More than one parameters in .mh_profile, Ralph Corderoy, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, valdis . kletnieks, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Kevin Cosgrove, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Paul Vixie, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Ralph Corderoy, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Tethys, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Jerrad Pierce, 2012/05/29
- Re: [Nmh-workers] More than one parameters in .mh_profile, Paul Vixie, 2012/05/29