Skip to content
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

After executing awscli, the input is not displayed, and the carriage return does not wrap #8247

Closed
amaoo opened this issue Oct 18, 2023 · 5 comments
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. p3 This is a minor priority issue rds

Comments

@amaoo
Copy link

amaoo commented Oct 18, 2023

Describe the bug

After executing the command that needs to turn pages, use ctrl+c to exit the command, which will result in the input not being displayed and the carriage return not being wrapped.

Expected Behavior

Normal input

Current Behavior

the input is not displayed, and the carriage return does not wrap

Reproduction Steps

For example, if you execute this command, the following results will appear.
There is an (END) at the end.
use ctrl+c to exit the command, which will result in the input not being displayed and the carriage return not being wrapped.

[cloudshell-user@ip-10-4-50-169 ~]$ aws rds describe-certificates
{
    "Certificates": [
...      
    {
            "CertificateIdentifier": "rds-ca-2019",
            "CertificateType": "CA",
            "Thumbprint": "d40ddb29e3750dffa671c3140bbf5f478d1c8096",
            "ValidFrom": "2019-08-22T17:08:50+00:00",
            "ValidTill": "2024-08-22T17:08:50+00:00",
            "CertificateArn": "arn:aws:rds:ap-northeast-1::cert:rds-ca-2019",
            "CustomerOverride": false
        }
    ],
    "DefaultCertificateForNewLaunches": "rds-ca-rsa2048-g1"
}
(END)
[cloudshell-user@ip-10-4-50-169 ~]$ ^C
[cloudshell-user@ip-10-4-50-169 ~]$ [cloudshell-user@ip-10-4-50-169 ~]$ [cloudshell-user@ip-10-4-50-169 ~]$ [cloudshell-user@ip-10-4-50-169 ~]$ /home/cloudshell-user
[cloudshell-user@ip-10-4-50-169 ~]$ /home/cloudshell-user

Possible Solution

stty sane
It will be normal after executing this command.

Additional Information/Context

No response

CLI version used

aws-cli/2.13.26

Environment details (OS name and version, etc.)

AWS CloudShell,MAC,WINDOWS,Linux

@amaoo amaoo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 18, 2023
@aBurmeseDev aBurmeseDev self-assigned this Oct 19, 2023
@aBurmeseDev aBurmeseDev removed the needs-triage This issue or PR still needs to be triaged. label Oct 20, 2023
@aBurmeseDev
Copy link
Member

Hi @amaoo - thanks for reaching out.

I'm not sure if I understand the statement "use ctrl+c to exit the command, which will result in the input not being displayed and the carriage return not being wrapped."

Can you please elaborate more on that? When I ran the command, it listed out all the certificates where you can extend the output by pressing arrow down, then I exited with ctrl+c and results are still displayed above.

Hope to hear back.

@aBurmeseDev aBurmeseDev added rds p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed bug This issue is a bug. labels Oct 21, 2023
@amaoo
Copy link
Author

amaoo commented Oct 23, 2023

When (END) appears, typing ctrl +C exits the aws command. However, when you type Enter, there is no line feed. It is not displayed when you type any command.
The same problem occurs not only with the aws rds command, but also with other commands that output too long a line.
Only when stty sane is typed does it return to normal.
image

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 23, 2023
@aBurmeseDev
Copy link
Member

@amaoo thanks for providing additional details.

This's actually expected behavior when using the default pager less in CLI v2 in AWS CloudShell. It only happens when the output is long enough to require scrolling where CLI pipes the output to a pager program like less. This allows you to scroll through the output and examine it before returning to the command prompt.

The (END) indicates you've reached the end of the paged output. To exit the pager and return to the prompt, you can press q rather than Ctrl + c command.

There are a few ways you can disable this pager, see here.

Hope that helps,
John

@aBurmeseDev aBurmeseDev added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 25, 2023
@amaoo
Copy link
Author

amaoo commented Oct 26, 2023

@aBurmeseDev Thank you very much for your reply.

@amaoo amaoo closed this as completed Oct 26, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. p3 This is a minor priority issue rds
Projects
None yet
Development

No branches or pull requests

2 participants