On Saturday, June 15, 2024, Koichi Murase <myoga.mur...@gmail.com> wrote: > > Also, the behavior of the `ps' command honoring COLUMNS to format its > output is also an expected one. >
The fact that programs giving precedence to COLUMNS over the terminal API are so common is an argument against exporting COLUMNS behind the user's back though. Right now, if you're dealing with such a program while `set -a' is in effect, in order to suppress COLUMNS you need to unexport it before every command: $ set -a $ env | grep COLUMNS $ env | grep COLUMNS COLUMNS=64 $ $ declare +x COLUMNS $ env | grep COLUMNS $ env | grep COLUMNS COLUMNS=64 This is true for non-interactive shells where job control is enabled as well. If Bash didn't export COLUMNS implicitly but you wanted it to take effect, you'd export it yourself once and it'd work fine. Clean and straightforward. -- Oğuz