[v2] Unable to prevent aws help output from going to a pager (AWS_PAGER, PAGER aren't respected)
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
The aws cli now sends its output to a pager. The cli also sends its `help` output to a pager which we've been finding to be disruptive and unhelpful; the help output disappears after exiting the pager (press q). This is difficult to work with when porting scripts and when remoted in.
### Problem
According to the [pull request that added this feature](https://github.com/aws/aws-cli/pull/4702), we should be able to set `AWS_PAGER=""` or `PAGER=""` and the CLI should not send the output to a pager. This is not working for us. Try:
PAGER="" aws ec2 help
results in
> list index out of range
AWS_PAGER="" aws ec2 help
results in the help output shown in a pager anyway.
### Expected
The environment variables `AWS_PAGER=""` or `PAGER=""` should be respected, setting those to `""` should disable the help output pager. Alternatively, the aws cli v2 output and help output should not go to a pager; make the paging feature opt-in rather than opt-out.
### Versions
aws-cli/2.0.0 Python/3.7.3 Linux/5.3.0-29-generic botocore/2.0.0dev4
Ubuntu 18.04
Contributor guide
Assessment
This issue has not been assessed yet.