[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New utility suggestion: chdir(1)
From: |
Jim Meyering |
Subject: |
Re: New utility suggestion: chdir(1) |
Date: |
Mon, 28 Aug 2017 21:17:57 -0700 |
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".
- 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 <=
- Re: New utility suggestion: chdir(1), Pádraig Brady, 2017/08/29
- 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