-
Notifications
You must be signed in to change notification settings - Fork 4k
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
please reconsider using a pager by default in v2 #5343
Comments
|
Hi @bgdnlp, thanks for the report and the details about your experience and your environment. There's another open issue related to this (#5102) regarding the defaults for this feature. I am surprised that the I'm going to leave this open as a feature request for now, as you have provided a number of good talking points. |
|
I've seen that issue, and the others, but we're asking for different things. What @QuinnyPig is asking for is good for an interactive tool like "git log", my point is that interactive use is not the main use case for aws-cli, unlike "git log". Even where it is used interactively, the paging behavior is not always wanted (see less defaults [1] and the comments on the linked issue). Also, isatty() might not be entirely reliable on other operating systems, for example on Windows. There are probably more corner cases. You could add a switch like About zsh, I don't know, maybe it behaves differently for different commands? That's why I mentioned what command I'm using to test. I can make it a bug report if it's a bug. This is what I'm using, slightly redacted: There's no output because it goes to less which doesn't print it to console. -- |
|
Cross referencing: I've submitted a PR that changes this behavior from default to opt-in. See #5398 |
|
Please reconsider this change, it is so disruptive. My usage of the AWS CLI is split pretty evenly between interactive use and automation scripting. I now have to work where, and in what cases, and how, I need to set or unset a combination of environment variables or configurations option to get the behaviour I want. |
|
Any news on this, especially @andrew-glenn 's patch? I keep tripping over it from time to time and I'm a bit worried of what will happen when/if some OS distributions switch from awscli v1 to awscli v2 while keeping the same package name. |
|
OMG I'm glad I finally spent some time to search up this issue. I've been going nuts for over a year, and I didn't know what changed to cause my AWS commands to show in less rather than stdout. My main gripe is that all my automation scripting started pausing in If AWS is hell-bent on using a pager by default, perhaps they can detect whether the command is invoked by the user or by another script, and only use the pager when in interactive mode. At least I have a workaround for now — set |
|
+1 to this! Some of our CI builds started hanging recently when they produced more than one page of output. It took us quite a while to isolate the issue to this new default setting. I'm not even sure if we've recently changed from v1 to v2 CLI, or if our scripts have recently started producing more than one page of output. I think it's not standard for unixy CLI tools to require interactive input by default. It should be opt-in to avoid breaking scripts. |
Please consider switching from using a pager by default to making it opt-in. It's great to have the option, just don't force it on everyone. It could be added to
aws configand the user could be asked about it on first setup. Please reconsider.It's not too late. The pain and confusion caused by this change is not worth the small benefit IMO. Especially since it's not working as intended. There are many combinations out there that are not Linux and bash.
Is your feature request related to a problem? Please describe.
I'm using Mac and zsh. My ~/.aws/credentials contains multiple profiles and "default" is not used.
aws-cli version is: aws-cli/2.0.28 Python/3.7.4 Darwin/19.5.0 botocore/2.0.0dev32
Command used to test:
aws --profile myprofile elasticache create-snapshot --cache-cluster-id mycluster --snapshot-name deletemecli_pager=in[default]doesn't work when using another profile. Which means I'd have to set it in every profile on every host.AWS_PAGER=""in ~/.zprofile (zsh) doesn't work for some reason. SettingAWS_PAGER="None"doesn't work either, it still pipes through less. I checked that the variable is set withset | grep AWS_PAGER. Note that $PAGER is also set, to less.Describe the solution you'd like
Turn off using a pager by default, leave it as an option.
Additional context
I realize there are ways to "fix" it or work around this new "feature". We could add instructions to new releases that use aws-cli v2. We can change all the scripts we have and set AWS_PAGER in them. Get fancy and try to detect if a tty is present and set accordingly.
But why? Serious question, what is the reasoning behind this breaking change, considering the amount of work we need to do to acomodate it? Personally I see the CLI as being used mainly in scripts, if I want an interactive experience I go to the web console.
The text was updated successfully, but these errors were encountered: