coreutils
[Top][All Lists]
Advanced

[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".



reply via email to

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