please reconsider using a pager by default in v2
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
**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 config` and 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 deleteme`
- On Mac and FreeBSD (at least), the output of less isn't printed to console by default. That is, when you quit less the output is lost, so you'd have to run the command again. Which is usually ok, but very annoying when it comes to aws-cli.
- Setting `cli_pager=` in `[default]` doesn't work when using another profile. Which means I'd have to set it in every profile on every host.
- Setting `AWS_PAGER=""` in ~/.zprofile (zsh) doesn't work for some reason. Setting `AWS_PAGER="None"` doesn't work either, it still pipes through less. I checked that the variable is set with `set | grep AWS_PAGER`. Note that $PAGER is also set, to less.
- What about running aws-cli in other environments? Containers, Lambda, embedded into other application packages, delivered to third parties, etc.
**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.
Contributor guide
Assessment
This issue has not been assessed yet.