Search code examples
amazon-web-serviceszshoh-my-zsh

Why oh my zsh require manually click Q after some AWS cli?


Before I install oh my zsh, I just run some command, terminal has records

aws sts get-caller-identity


{
    "UserId": "xxxxxxxxxxxxx",
    "Account": "12345678",
    "Arn": "arn:aws:iam::12345678:user/yang.fei"
}

But when I install oh my zsh, need manually click Q to exit

aws sts get-caller-identity

# it will open a new
{
    "UserId": "xxxxxxxxxxxxx",
    "Account": "12345678",
    "Arn": "arn:aws:iam::12345678:user/yang.fei"
}
(END)

# after I click Q, there is no record is terminal history
aws sts get-caller-identity --output json 
aws sts get-caller-identity --output json

Solution

  • You need to disable the cli pager, see the dos:

    • open the ~/.aws/config file
    • add cli_pager= the [default] section