-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2] Unable to prevent aws help output from going to a pager (AWS_PAGER, PAGER aren't respected) #4972
Comments
In the pull request, it was intended that the pagers only affected command output. That being said, I'm not opposed to adding the option to control the pager functionality for the In the meantime if you want to have the help output be printed directly to stdout, you can use a pipe (i.e. to something like
|
Thanks, any environment-variable means to disable it should be fine; I can work with the cat method for now though explaining it to many devs isn't a simple task so I am eager for a fix to this. I should add: I'm also one of the users upgrading and I did expect
so it makes sense at least to me that all pager output is disabled rather than the user having to understand the distinction. |
Is there any progress on this? |
Not having a way to change this is one of those mildly annoying things that becomes infuriating because of how simple it should be. You read the docs and try to disable it, but nowhere does it state it doesn't apply to |
Ran into this one today too. Because VSCode's "Terminal" happily gives you a pager even when PAGER is unset, I had to set
helpful, isn't it? All googling failed me and I searched here and found this issue.
|
WindowsIn Windows 10 Pro 21H2, I notice that neither Powershell 7.2.5Both of the following commands result in paginated output. $AWS_PAGER=""; $PAGER=""; aws secretsmanager help
$AWS_PAGER=""; $PAGER=""; aws ec2 describe-instances The following works as expected and does not produce paginated output: aws ec2 describe-instances --no-cli-pager Of course, this flag isn't accepted on help output so there's no workaround there. Command PromptI tried the commands below in Command Prompt and found the following: C:\Users\JimSpeir>aws ec2 help
#Paginated output
C:\Users\JimSpeir>set PAGER=""
C:\Users\JimSpeir>set AWS_PAGER=""
C:\Users\JimSpeir>aws ec2 help
'""' is not recognized as an internal or external command,
operable program or batch file. Which I think shows that the environment variables are being read and used to an extent since it looks like awscli is trying to spawn LinuxI've never had any issues on Ubuntu 22.04 with the default build not producing paginated output. I've found WSL Ubuntu containers are the same as stock Ubuntu which gives me something of an out if it really bothers me. But it kind of sucks that I have to google the command to get the manpage instead of just being able to view it. |
This would provide not only the least-surprising, least-disruptive path forward, but also give users maximal control. Right now I'm using We could also use |
I should add that (at least as I write this with aws-cli 2.11.18), this only works with |
I'm having the opposite problem, where aws help is NEVER paged, but I would like it to be. I'm on mac OS Sonoma (Apple Silicon), using aws on zsh and bash. The proposed solution of an AWS_HELP_PAGER env var would be acceptable. |
This is still continuing to happen; I have the same issue any time I run an
...and given that I'd prefer to have control over when I actually have |
I think it is absurd this is opened since 2020 when fix is literally 3 changed lines: #8891 (comment) . I guess I will just have to patch the file locally after every update. I went through the comments and do not understand why it takes so long to fix it. This should not be about AWS_PAGER at all. The PAGER is already supported for help, but has a bug causing it not being able to handle an empty value. So just quick-fix the bug and debate the rest later, no? |
@graywolf-s1 's fix seems to make sense to me. If the However |
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, we should be able to set
AWS_PAGER=""
orPAGER=""
and the CLI should not send the output to a pager. This is not working for us. Try:results in
results in the help output shown in a pager anyway.
Expected
The environment variables
AWS_PAGER=""
orPAGER=""
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
The text was updated successfully, but these errors were encountered: