[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env: add -S option (split string for shebang lines in scripts)
From: |
Eric Blake |
Subject: |
Re: env: add -S option (split string for shebang lines in scripts) |
Date: |
Fri, 27 Apr 2018 08:13:00 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/27/2018 01:31 AM, Bernhard Voelker wrote:
> On 04/26/2018 09:17 AM, Assaf Gordon wrote:
>> Attached an updated patch, hopefully addressing all the issues below.
>
> Great work, thanks!
>
> One nit: env -v shows a confusing error diagnostic when it is
> separated from the -S option on the shebang line:
>
> Well, env doesn't know at that point that -S is coming later ... still
> the error message is really confusing. Any idea?
We could include ' ' (and maybe '\t') as part of the short-option
optstring accepted in getopt_long(), as an undocumented silent no-op.
That would make '-v ' behave the same as '-v'. But I'm not sure if it
is ever possible to coax getopt_long() into parsing '-v-' as accepting a
short option named '-' (since usually, the string '--' is treated as
end-of-options). Worth a try, to see if it works?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- env: add -S option (split string for shebang lines in scripts), Assaf Gordon, 2018/04/22
- Re: env: add -S option (split string for shebang lines in scripts), Pádraig Brady, 2018/04/23
- Re: env: add -S option (split string for shebang lines in scripts), Assaf Gordon, 2018/04/24
- Re: env: add -S option (split string for shebang lines in scripts), Assaf Gordon, 2018/04/26
- Re: env: add -S option (split string for shebang lines in scripts), Pádraig Brady, 2018/04/27
- Re: env: add -S option (split string for shebang lines in scripts), Bernhard Voelker, 2018/04/27
- Re: env: add -S option (split string for shebang lines in scripts),
Eric Blake <=
- Re: env: add -S option (split string for shebang lines in scripts), Eric Blake, 2018/04/27
- Re: env: add -S option (split string for shebang lines in scripts), Eric Blake, 2018/04/27
- Re: env: add -S option (split string for shebang lines in scripts), Eric Blake, 2018/04/27
- Re: env: add -S option (split string for shebang lines in scripts), Assaf Gordon, 2018/04/27