aws-cli
aws-cli copied to clipboard
formatting is borked when running `aws help config-vars`
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x] I've gone though the User Guide and the API reference
- [x] I've searched for previous similar issues and didn't find any solution
Describe the bug
when running aws help config-vars, the output of the GENERAL OPTIONS section is not formatted correctly
It looks like this:
GENERAL OPTIONS
The AWS CLI has a few general options:
center; |l|l|l|l|l|. _ T{ Variable T} T{ Option T} T{ Config Entry
T} T{ Environment Variable T} T{ Description T} _ T{ profile
T} T{ --profile T} T{ N/A T} T{ AWS_PROFILE T} T{ Default pro-
file name T} _ T{ region T} T{ --region T} T{ region T} T{
AWS_DEFAULT_REGION T} T{ Default AWS Region T} _ T{ output T} T{
--output T} T{ output T} T{ AWS_DEFAULT_OUTPUT T} T{ Default out-
put style T} _ T{ cli_timestamp_format T} T{ N/A T} T{ cli_time-
stamp_format T} T{ N/A T} T{ Output format of timestamps T} _ T{
cli_follow_urlparam T} T{ N/A T} T{ cli_follow_urlparam T} T{ N/A
T} T{ Fetch URL url parameters T} _ T{ ca_bundle T} T{ --ca-bundle
T} T{ ca_bundle T} T{ AWS_CA_BUNDLE T} T{ CA Certificate Bundle
T} _ T{ parameter_validation T} T{ N/A T} T{ parameter_validation
T} T{ N/A T} T{ Toggles parameter validation T} _ T{ tcp_keepalive
T} T{ N/A T} T{ tcp_keepalive T} T{ N/A T} T{ Toggles TCP
Keep-Alive T} _ T{ max_attempts T} T{ N/A T} T{ max_attempts
T} T{ AWS_MAX_ATTEMPTS T} T{ Number of total requests T} _ T{
retry_mode T} T{ N/A T} T{ retry_mode T} T{ AWS_RETRY_MODE
T} T{ Type of retries performed T} _ T{ cli_pager T} T{
--no-cli-pager T} T{ cli_pager T} T{ AWS_PAGER T} T{ Redi-
rect/Disable output to pager T} _
The third column, Config Entry, is the value you would specify in the
AWS CLI config file. By default, this location is ~/.aws/config. If
you need to change this value, you can set the AWS_CONFIG_FILE environ-
ment variable to change this location.
The valid values of the output configuration variable are:
o json
o table
o text
SDK version number
$ aws --version
aws-cli/2.1.25 Python/3.7.4 Darwin/20.4.0 exe/x86_64 prompt/off
Platform/OS/Hardware/Device
MacOS and ZSH
To Reproduce (observed behavior)
just type aws help config-vars and look at the output
Hi again @kidbrax,
Thanks for pointing this out! I was able to reproduce this. It seems less has trouble with the table output listed for "General Options" here. I'm not seeing this issue in Powershell, but I haven't tested any other shells to see if other pagers are affected by this. Marking as a bug for now.
I think there's an open PR that would resolve this:
https://github.com/aws/aws-cli/pull/4855
We would need to check all the places we use tables and make sure that this addresses, as well as that it doesn't have any effect on other content.
Alternatively, we could forego a table here and reformat it into an enumerated list. What do you think about the readability in that case? Something like:
General Options
The AWS CLI has a few general options:
- Default profile name
- Variable:
profile - Option:
--profile - Configuration entry: N/A
- Environment Variable:
AWS_PROFILE
- Variable:
Hi @kdaily I did your suggestion. What do you think ?
Can't reproduce in iTerm2:
Can't reproduce in Terminal.app
Version:
$ aws --version
aws-cli/2.13.3 Python/3.11.4 Darwin/22.5.0 exe/x86_64 prompt/off
@debora-ito was able to reproduce the issue and gave us a bit of a hint: It's groff.
I installed groff and lo and behold:
Something throws an error during render:
<string>:450: (ERROR/3) Unknown interpreted text role "doc".
~~This transiently shows up after I install groff, but then sticks around after I remove groff~~. Edit: nevermind, I checked an old terminal window that I used to check and sure enough, it's there before I installed groff, so that's a bug somewhere else. I'm going to guess that's a leftover from our doc building process seeping out of the seams somewhere.
@indrora it seems that <string>:450: (ERROR/3) Unknown interpreted text role "doc". error is due to this line https://github.com/aws/aws-cli/blob/3477bdbb546d73a96e79cfa474cd2dbc7b3b225d/awscli/topics/config-vars.rst?plain=1#L507