1

When trying to run a for loop or even an aws list command in zsh with Oh My zsh, the shell clears the terminal, and I get something like:

{
RETURNED DATA
}
(END)

I have to enter q in order to return back to the original shell and I see my command with no returned data, though the command has run successfully. If I remove ~/.zshrc it works. It seems to be an issue with the Oh My zsh file.

Paul Dawson
  • 1,332
  • 14
  • 27
  • 1
    Maybe it's PAGER settings?. What do you see with `for f in /var/*; do print $f; done` ? – Alex Yu Dec 08 '20 at 20:16
  • Yeah that works. It seems to be related to JSON being returned. I was using a `seq 1 10` loop with aws cli which returns JSON. – Paul Dawson Dec 08 '20 at 21:19
  • 1
    Thanks for the pager tip. This resolved it. https://stackoverflow.com/questions/60122188/how-to-turn-off-the-pager-for-aws-cli-return-value I added `export AWS_PAGER=""` to .zshrc and it did the trick. – Paul Dawson Dec 08 '20 at 21:45

0 Answers0