Original: "
nucould read command so it could serve as a jq replacement"
Change usage to:
nu [OPTIONS] [COMMAND]
so you could do:
nu 'open https://api.github.com/repos/stedolan/jq/commits | first 1 | to-json'
This could make nu a viable replacement for jq so nu could sneak itself into bash scripts etc. that currently use jq. The equivalent jq command to the above is:
curl https://api.github.com/repos/stedolan/jq/commits | jq '.[0]'
Care would have to be taken to pipe the stdin and stdout correctly.
This makes a lot of sense to me. We could just make it -c like bash, but I bet there's gotchas about how bash -c works that we'd want to avoid.
We support nu -c now, closing
Most helpful comment
This makes a lot of sense to me. We could just make it
-clike bash, but I bet there's gotchas about howbash -cworks that we'd want to avoid.