micha / resty

Little command line REST client that you can use in pipelines (bash or zsh).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with macOS Catalina / Z shell

mitya opened this issue · comments

The default shell on the latest macOS is Z shell and it seem to have issues with Resty:

The problem is that when running under zsh the special characters in the JSON responses are printed as is, so, for example, the new line character is actually printed to the terminal instead of being outputted like "first line\nsecond line". JSON spec requires all control characters to be escaped, so piping resty output to a JSON parser is impossible now. E.g. GET /some/api | jq will fail.

Given that curl works fine with Z, the issue is probably on the Resty side.

Thank you