cargo-outdated icon indicating copy to clipboard operation
cargo-outdated copied to clipboard

Colorize output

Open flosse opened this issue 6 years ago • 4 comments

It would be cool if the output is colorized :) Here is an idea:

  • mark yanked versions with red
  • outdated parts with orange (e.g. in 1.2.4 -> 1.3.7 the 3.7 would be orange)
  • and up to date parts with green (e.g. in 1.2.4 -> 1.3.7 the 1 would be green)

flosse avatar Sep 01 '17 10:09 flosse

Kinda related to #52 , but with different requirements. And I need to test whether the yanked ones could actually be captured by cargo update or not... e.g. if a crate is yanked, will cargo update replaced it with the last compatible version? What if the yanked one is the only version that's compatible with its SemVer requirement?

Frederick888 avatar Sep 01 '17 11:09 Frederick888

Can I do this with https://crates.io/crates/yansi?

pickfire avatar Apr 11 '18 17:04 pickfire

There are loads of color crates out there: https://crates.io/keywords/color

pravic avatar Apr 11 '18 17:04 pravic

I did took a look at them, the other options that I prefer is https://crates.io/crates/colored.

Of course, I personally tried and used yansi in https://github.com/pickfire/apu_tt/commit/8241c103c31ad1af0229bade4bb44aaf2c4643ca.

https://crates.io/crates/termcolor seems nice but it doesn't play nice with https://crates.io/crates/tabwriter where you need to wrap one in the other and wrap it the other way around again.

pickfire avatar Apr 11 '18 17:04 pickfire