micha / resty

Little command line REST client that you can use in pipelines (bash or zsh).
MIT License
2.65k stars 143 forks source link

Issues with macOS Catalina / Z shell #90

Open mitya opened 4 years ago

mitya commented 4 years ago

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