env: add --chdir option
commit57dea5ed07471b2192cc5edf08993e663a3f6802
authorColin Watson <cjwatson@debian.org>
Sun, 27 Aug 2017 07:16:21 +0000 (27 08:16 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 29 Aug 2017 07:38:19 +0000 (29 00:38 -0700)
tree1389a554324608c041f868e6aae381f6e52109ab
parent26860526670566d9b0ea42ff27fa73668b9a19da
env: add --chdir option

This is useful when chaining with other commands that run commands in a
different context, while avoiding using the shell to cd, and thus
having to consider shell quoting the chained command.

* NEWS (New features): Document the new option.
* doc/coreutils.texi (env invocation): Likewise.
* src/env.c (usage): Likewise.
(main): Implement the new option.
* tests/misc/env.sh: Test the new option.
NEWS
doc/coreutils.texi
src/env.c
tests/misc/env.sh