[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New utility suggestion: chdir(1)
From: |
Pádraig Brady |
Subject: |
Re: New utility suggestion: chdir(1) |
Date: |
Mon, 28 Aug 2017 21:24:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 28/08/17 21:17, Jim Meyering wrote:
> On Mon, Aug 28, 2017 at 8:55 PM, Pádraig Brady <address@hidden> wrote:
>> I'll push the attached shortly.
>> This supports -C and also requires specifying a command
>> when specifying -C, as otherwise you get confusing
>> output and no error with `env --chdir command` which would
>> just print the environment with the previous version.
>> It's of no functional value to print the env while
>> also changing dir as far as I can see.
>
> Thanks for working on that. Nits in env.c:
>
> + if (opt_nul_terminate_output && program_specified)
> {
> + error (0, errno, _("cannot specify --null (-0) with command"));
> + usage (EXIT_CANCELED);
> + }
> +
> + if (newdir && ! program_specified)
> + {
> + error (0, errno, _("must specify command with --chdir (-C)"));
> + usage (EXIT_CANCELED);
> + }
>
> Each of those uses of "errno" should be "0".
>
nice catch. adjusted
- New utility suggestion: chdir(1), Colin Watson, 2017/08/26
- Re: New utility suggestion: chdir(1), Colin Watson, 2017/08/26
- Re: New utility suggestion: chdir(1), Pádraig Brady, 2017/08/26
- Re: New utility suggestion: chdir(1), Colin Watson, 2017/08/27
- Re: New utility suggestion: chdir(1), Pádraig Brady, 2017/08/27
- Re: New utility suggestion: chdir(1), Bernhard Voelker, 2017/08/28
- Re: New utility suggestion: chdir(1), Pádraig Brady, 2017/08/28
- Re: New utility suggestion: chdir(1), Pádraig Brady, 2017/08/28
- Re: New utility suggestion: chdir(1), Jim Meyering, 2017/08/29
- Re: New utility suggestion: chdir(1),
Pádraig Brady <=
- Re: New utility suggestion: chdir(1), Colin Watson, 2017/08/29
Re: New utility suggestion: chdir(1), Kaz Kylheku (Coreutils), 2017/08/26
Re: New utility suggestion: chdir(1), Kaz Kylheku (Coreutils), 2017/08/27