[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: it, soRE: set -a leads to truncated output from ps
From: |
Greg Wooledge |
Subject: |
Re: it, soRE: set -a leads to truncated output from ps |
Date: |
Thu, 13 Jun 2024 14:42:32 -0400 |
On Thu, Jun 13, 2024 at 06:28:23PM +0000, Alain BROSSARD via Bug reports for
the GNU Bourne Again SHell wrote:
> My conclusion is that the variable COLUMNS gets “reset” when there is a
> pipe in a command and further gets EXPORTED if “set -a” was set before hand :
>
> host:/$ COLUMNS=80
> host:/$ echo $COLUMNS
> 80
> host:/$ echo $COLUMNS
> 80
> host:/$ echo $COLUMNS | cat
> 80
> host:/$ echo $COLUMNS
> 102
OK, that's interesting. I can confirm this in Debian's bash 5.2.15:
hobbit:~$ bash
hobbit:~$ set -a
hobbit:~$ env | grep COLUMN
hobbit:~$ true | false
hobbit:~$ env | grep COLUMN
COLUMNS=80
hobbit:~$ echo $BASH_VERSION
5.2.15(1)-release
I did not move or resize the window at any time during this test.
The same thing happens in a compiled upstream 5.2.26:
hobbit:~$ bash-5.2.26
hobbit:~$ set -a
hobbit:~$ env | grep COLUMN
hobbit:~$ env | grep COLUMN
COLUMNS=80
Again, I did not move or resize this window during this test. It is an
80x24 rxvt-unicode terminal, about as plain as you can get. I get the
same result in an xterm also.
I still have no idea why you're running set -a in an interactive shell.
- set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/13
- Re: set -a leads to truncated output from ps, alex xmb sw ratchev, 2024/06/13
- RE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/13
- Re: set -a leads to truncated output from ps, Oğuz, 2024/06/13
- Re: set -a leads to truncated output from ps, alex xmb sw ratchev, 2024/06/13
- it, soRE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/13
- Re: it, soRE: set -a leads to truncated output from ps, Oğuz, 2024/06/13
- RE: it, soRE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/13
- Re: it, soRE: set -a leads to truncated output from ps,
Greg Wooledge <=
- Re: it, soRE: set -a leads to truncated output from ps, alex xmb sw ratchev, 2024/06/14
- Re: it, soRE: set -a leads to truncated output from ps, Robert Elz, 2024/06/13
Re: set -a leads to truncated output from ps, Andreas Schwab, 2024/06/13
- Re: set -a leads to truncated output from ps, Greg Wooledge, 2024/06/13
- RE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/13
- Re: set -a leads to truncated output from ps, Chet Ramey, 2024/06/13
- Re: set -a leads to truncated output from ps, Oğuz, 2024/06/13
- RE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/14
- Re: set -a leads to truncated output from ps, Greg Wooledge, 2024/06/14
- RE: set -a leads to truncated output from ps, Alain BROSSARD, 2024/06/14