[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New utility suggestion: chdir(1)
From: |
Colin Watson |
Subject: |
Re: New utility suggestion: chdir(1) |
Date: |
Sun, 27 Aug 2017 21:02:07 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sun, Aug 27, 2017 at 06:58:19AM -0700, Kaz Kylheku (Coreutils) wrote:
> On 26.08.2017 11:10, Colin Watson wrote:
> > I would like there to be an adverbial version of "cd", which takes a
> > path followed by a command and optional arguments and executes the
> > command with its working directory set to the given path. Its
> > invocation would be similar to chroot(8), that is:
> >
> > chdir [OPTION] NEWDIR [COMMAND [ARG]...]
>
> Could be an option in "env".
>
> env -C /path/to/dir VAR=value ... command arg
>
> (-C follows "tar -C' and "make -C").
Yep, Pádraig made a similar suggestion in
https://lists.gnu.org/archive/html/coreutils/2017-08/msg00055.html and
the second patch I attached to
https://lists.gnu.org/archive/html/coreutils/2017-08/msg00058.html
implements it.
I intentionally didn't add a short option, though, because env(1) is a
standardised utility with multiple implementations and I didn't want to
risk colliding with somebody else's extension.
--
Colin Watson [address@hidden]
- Re: New utility suggestion: chdir(1), (continued)
- 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, 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
- Re: New utility suggestion: chdir(1),
Colin Watson <=