New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to change COLUMNS environment variable? #1847
Possible to change COLUMNS environment variable? #1847
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues. |
stalebot seems keen to close this issue ... |
It says on https://github.com/probot/stale#is-closing-stale-issues-really-a-good-idea
Yet, now it's closed ... |
Also looking for this feature. |
Yes, but stale bot closed the issue two weeks ago, so the maintainers might not see this issue any longer.
... gives me the impression that this could potentially be looked on. Creating a new identical issue doesn't seem optimal. |
AFAIK this is already possible with either an environment file, service level overrides or setting a user space lando global config that overrides the If those don't work this is something we could look into at some point but i'm guessing it would fall lower on the priority list. |
Thanks for your input @pirog. I went back and experimented some more. I could have sworn that I already tried this, but perhaps I forgot to rebuild ... but this works: Set per project in
...or set with a user space lando global config in
Looking in the output of
I understand it is a matter of taste, but would it make sense to reduce the default number of columns from 256 to for example 180 in https://github.com/lando/lando/blob/master/plugins/lando-core/index.js? Looking at my own command line with |
We should revisit this in 4.x...@pirog indicated that in the future we could set container COLUMNS using the host value of COLUMNS, which might be another good solution to follow the user's lead. |
@reynoldsalec |
@eldair i think it would depend on the usage. in the future im guessing COLUMNS will be set on "execs" which means they will update the next time you run a |
@pirog yeah, I was interested in CLI/tooling (like artisan command) |
Yeah artisan commands is my exact usecase here. Setting the COLUMNS manually is problematic with splitting/resizing terminals |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues. |
/unstale |
For lando 3 you could pass the local (Be aware that other non-trivial env-var values, or non-trivial commands, may fall foul of lando/cli#212; but the likes of You might need to use # Check how many columns the terminal has. Older versions of tput return
# "80" here when both stdout and stderr have been redirected, so running
# 'tput cols 2>/dev/null' in a subshell is a problem. Instead we check
# whether it exits successfully, so that we can call it again without the
# stderr redirection.
if [ -z "${COLUMNS}" ]; then
if command -v tput >/dev/null 2>&1 && tput cols >/dev/null 2>&1; then
COLUMNS="$(tput cols)"
fi
fi |
The command line column width is set to 256 columns:
Is it possible to change this? I found the Environment page, and tried tweaking the value by creating a new
defaults.env
file, and adding this:COLUMNS=80
... and this to my
.lando.yml
file:... and rebuilding Lando, but it doesn't seem to work.
Is it even possible to change this? I would be fine setting this globally, for all my Lando environments.
The text was updated successfully, but these errors were encountered: