rust-lang / rustup

The Rust toolchain installer
https://rust-lang.github.io/rustup/
Apache License 2.0
6.19k stars 892 forks source link

Machine-readable output #450

Open fenhl opened 8 years ago

fenhl commented 8 years ago

I used to have a function in my shell that shows when the current directory is running on a multirust toolchain other than stable. The current formatting is making the port to rustup.rs difficult. An option to generate machine-readable output (preferably JSON) on relevant commands like rustup show and rustup override list would be great.

brson commented 8 years ago

Yes indeed. Sorry for breaking your stuff, but I did make the decision to cater to human-reading first.

Since this is mostly for shell scripts I'd guess it's best to do something simple and line-oriented. The default 'smart' behavior of show where it decides how much to show or not would be bad.

Perhaps a scheme like

matklad commented 8 years ago

Since this is mostly for shell scripts

It would be useful in IntelliJ Rust as well, though I would also prefer simple text format.

dherman commented 7 years ago

This looks like it could be useful for Neon too -- +1 to shell script-friendliness. For the time being I may end up parsing the output of rustc --version or rustup toolchain list, but a stable machine-readable output would be awesome!

alexreg commented 7 years ago

Any progress on this?

QAston commented 1 year ago

Still needed