Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-24 Thread Chet Ramey
On 10/24/18 2:51 AM, Robert Elz wrote: > I have complained about this (in private) to Chet before ... there are > times when I want to run commands with a complely empty environment, > but no matter how I try to make it go away, that _ keeps sticking its > nose in... The rest of what bash (by d

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Robert Elz
Date:Tue, 23 Oct 2018 15:37:15 -0600 From:Bob Proulx Message-ID: <20181023151944393472...@bob.proulx.com> | I'm having a hard time understanding why one would want to turn off | this feature. Because I regard it as a design bug (from ksh, copied into bash) not as

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Bob Proulx
Robert Elz wrote: > ps: I did not suggest that $_ should go away, I know that's not going to > happen ... just that it would be nice for those who really don't want it to > be able to turn it off. I'm having a hard time understanding why one would want to turn off this feature. It isn't somethin

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Greg Wooledge
On Tue, Oct 23, 2018 at 02:06:37PM +0700, Robert Elz wrote: > Interactively you're much more > likely to want !$ than $_ (I'd suggest infinitely more lijkely...) You mean negative infinity. wooledg:~$ grep histexpand .bashrc set +o histexpand

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Robert Elz
ps: I did not suggest that $_ should go away, I know that's not going to happen ... just that it would be nice for those who really don't want it to be able to turn it off. kre

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-23 Thread Robert Elz
Date:Mon, 22 Oct 2018 09:37:19 -0400 From:Greg Wooledge Message-ID: <20181022133719.g4wc7uuowwfff...@eeg.ccf.org> | I occasionally run a command like mkdir /tmp/x && cd "$_" cdnd() { mkdir -p "$1" && cd "$1" } Make it as fancy as you want. Interactively

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-22 Thread Greg Wooledge
On Mon, Oct 22, 2018 at 12:54:42PM +0700, Robert Elz wrote: > Scripts that want to use $_ (if there are any, which I doubt) won't be > unsetting it and would continue to work, the rest of us (at least those of > us not insane enough to try and use it) could just "unset _" in .profile (etc) > and be

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-21 Thread Robert Elz
Date:Fri, 19 Oct 2018 16:21:27 -0400 From:Grisha Levit Message-ID: | I guess it's a bit surprising that $_ is set to just the variable name | and not "the last argument to the previous command", which would be | the full assignment string. Except that a var a

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-19 Thread Grisha Levit
On Fri, Oct 19, 2018 at 3:51 PM Greg Wooledge wrote: > On Fri, Oct 19, 2018 at 09:41:41PM +0200, Ricky Tigg wrote: > > $ set | grep SSL > > SSLKEYLOGFILE=/home/user/test > > _=SSLKEYLOGFILE I guess it's a bit surprising that $_ is set to just the variable name and not "the last argument to the pr

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-19 Thread Greg Wooledge
On Fri, Oct 19, 2018 at 09:41:41PM +0200, Ricky Tigg wrote: > Built-in function 'set' produces variable outputs. > $ export SSLKEYLOGFILE=/home/user/test > > $ set | grep SSL > SSLKEYLOGFILE=/home/user/test > _=SSLKEYLOGFILE This is not a bug. The Special Parameter "_" is explained in the manua

GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

2018-10-19 Thread Ricky Tigg
Built-in function 'set' produces variable outputs. OS: Fedora 29 – Component: bash-4.4.23-5.fc29.x86_64 To reproduce: $ export SSLKEYLOGFILE=/home/user/test $ set | grep SSL SSLKEYLOGFILE=/home/user/test _=SSLKEYLOGFILE $ set | grep SSL SSLKEYLOGFILE=/home/user/test Expected result right afte