GNU bug report logs - #44412
RFE for 'env'?

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Tue, 3 Nov 2020 09:15:02 UTC

Severity: normal

Tags: notabug

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44412 in the body.
You can then email your comments to 44412 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#44412; Package coreutils. (Tue, 03 Nov 2020 09:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to L A Walsh <coreutils <at> tlinx.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 03 Nov 2020 09:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: L A Walsh <coreutils <at> tlinx.org>
To: Coreutils <bug-coreutils <at> gnu.org>
Subject: RFE for 'env'?
Date: Tue, 03 Nov 2020 01:14:06 -0800
I wanted to pass a switch to an interp line, but 'env' seems to dislike it.

I also noticed that env ignores '--' to indicate end of switches that it 
should
process.

How difficult would this be to do? Specifically,
allow double-dash ("--") to indicate the end of 'env' switches such
that any following arguments would be passed to program to be run?

I was surprised when I found out it didn't do this.

Thanks!







Information forwarded to bug-coreutils <at> gnu.org:
bug#44412; Package coreutils. (Tue, 03 Nov 2020 12:30:03 GMT) Full text and rfc822 format available.

Message #8 received at 44412 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: L A Walsh <coreutils <at> tlinx.org>, 44412 <at> debbugs.gnu.org
Subject: Re: bug#44412: RFE for 'env'?
Date: Tue, 3 Nov 2020 13:29:13 +0100
On 11/3/20 10:14 AM, L A Walsh wrote:
> I wanted to pass a switch to an interp line, but 'env' seems to dislike it.
> 
> I also noticed that env ignores '--' to indicate end of switches that it 
> should
> process.
> 
> How difficult would this be to do? Specifically,
> allow double-dash ("--") to indicate the end of 'env' switches such
> that any following arguments would be passed to program to be run?
> 
> I was surprised when I found out it didn't do this.
> 
> Thanks!

As you didn't give an example, it's hard for me to imagine what you
want to achieve, or better why current 'env' would "dislike it".

I mean, passing an environment variable starting with a minus already
works by using "--" as an option separator:

  $ env --chdir=/tmp -- -KEY=VAL printenv  -- -KEY
  VAL

What did I miss?

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#44412; Package coreutils. (Tue, 03 Nov 2020 17:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 44412 <at> debbugs.gnu.org (full text, mbox):

From: L A Walsh <coreutils <at> tlinx.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 44412 <at> debbugs.gnu.org
Subject: Re: bug#44412: RFE for 'env'?
Date: Tue, 03 Nov 2020 09:29:18 -0800

On 2020/11/03 04:29, Bernhard Voelker wrote:
>
> As you didn't give an example, it's hard for me to imagine what you
> want to achieve, or better why current 'env' would "dislike it".
---
	I tried to use 'env' to find perl in my path and wanted to pass
the -T option to perl.

/usr/bin/env perl -T

print "Hello World\n";

Couldn't figure out anyway to have env look up my program in my path and
to pass an option to that program.





Information forwarded to bug-coreutils <at> gnu.org:
bug#44412; Package coreutils. (Tue, 03 Nov 2020 22:50:01 GMT) Full text and rfc822 format available.

Message #14 received at 44412 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: 44412 <at> debbugs.gnu.org
Subject: Re: bug#44412: RFE for 'env'?
Date: Tue, 3 Nov 2020 23:48:51 +0100
tag 44412 notabug
close 44412
stop

On 11/3/20 6:29 PM, L A Walsh wrote:
> 
> 
> On 2020/11/03 04:29, Bernhard Voelker wrote:
>>
>> As you didn't give an example, it's hard for me to imagine what you
>> want to achieve, or better why current 'env' would "dislike it".
> ---
> 	I tried to use 'env' to find perl in my path and wanted to pass
> the -T option to perl.
> 
> /usr/bin/env perl -T
> 
> print "Hello World\n";
> 
> Couldn't figure out anyway to have env look up my program in my path and
> to pass an option to that program.

Thanks, so it seems 'env' works as expected and supports the way you need
it to run.  Therefore, I'm marking this as not a bug in the bug tracker.
Of course, discussion may continue if needed.

Have a nice day,
Berny




Added tag(s) notabug. Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Tue, 03 Nov 2020 22:50:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 44412 <at> debbugs.gnu.org and L A Walsh <coreutils <at> tlinx.org> Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Tue, 03 Nov 2020 22:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.