-
-
Notifications
You must be signed in to change notification settings - Fork 75
extend --shorten-paths
; highlight path segments
#210
Conversation
this commit extends `--shorten-paths` so it now also handles: - `/rustc` paths - `rust-std` paths it also adds highlighting to paths when `--shorten-paths` is not used
|
||
assert_eq!(expected, path); | ||
|
||
let expected_str = "[stable]/library/core/src/sync/atomic.rs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the picture in the PR description doesn't show how a rust-std
path is compressed but this test does
use rstest::rstest; | ||
|
||
#[rstest] | ||
#[case("stable-x86_64-unknown-linux-gnu", Channel::Stable, "stable")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the picture in the PR description doesn't show how a
rust-std
path is compressed but this test does
and this is how the toolchains are shortened with --shorten-paths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏾
Co-authored-by: Johann Hemmann <[email protected]>
Looks good to me and I like the shortening! 😄 I think I would like to have this enabled per default and a flag for printing the long paths, but this is a story for another PR :D |
bors r=Urhengulas |
this commit extends
--shorten-paths
so it now also handles:/rustc
pathsrust-std
pathsit also adds highlighting to paths when
--shorten-paths
is not usedwithout
![Screenshot from 2021-05-20 14-34-44](https://user-images.githubusercontent.com/5018213/118979427-bf33f700-b978-11eb-908e-ef84a85384c9.png)
--shorten-paths
with
![Screenshot from 2021-05-20 14-34-27](https://user-images.githubusercontent.com/5018213/118979458-c78c3200-b978-11eb-87d2-2ba23af1bbec.png)
--shorten-paths
closes #66