2024年6月15日(土) 22:48 Koichi Murase <myoga.mur...@gmail.com>: > 2024年6月15日(土) 13:48 Oğuz <oguzismailuy...@gmail.com>: > > 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. > > I'm not sure how it is against exporting COLUMNS. I agree that it may > cause unexpected behaviors when a user or a script uses the utilities > using COLUMNS in the wrong way, but the existence of the programs > using COLUMNS implies that those programs expect the users to export > it when the user likes to do it. If those programs would not expect > COLUMNS to be exported, why do these programs read the environment > variable COLUMNS in the first place?
Sorry, I think I misunderstood the part "behind the user's back". Now I guess you were talking about the behavior of `checkwinsize' when `set -a' is enabled? In that part of my original reply, I talked about the case where a user or a script intentionally exports those variables. -- Koichi