rural icon indicating copy to clipboard operation
rural copied to clipboard

hey RustNYCer :)

Open Dowwie opened this issue 7 years ago • 1 comments

Hey Saghm! This project is a great idea! Rust command line utilities for the win.

Someone recently ported httpbin.org to Rust. You might for this useful for rural testing: https://github.com/svartalf/actix-httpbin

I noticed that rural isn't playing nicely with jq. For instance, this works with HTTPie whereas with rural it doesn't: http GET "https://httpbin.org/json" | jq

This produces an error: rural get "https://httpbin.org/json" | jq parse error: Invalid numeric literal at line 2, column 4

-Darin

Dowwie avatar Oct 11 '18 11:10 Dowwie

Hi Darin! Sorry for the delayed response! The issue seems to be that rural doesn't currently detect whether stdout is a pipe or redirection, so it's still printing ANSI color codes to the terminal in the case that it's piping to jq. I'll definitely add support for this, but in the meantime, you can use the --no-color flag (aliased as -n) when piping the output to jq, which works fine from my local testing.

saghm avatar Nov 24 '18 17:11 saghm