-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add colour to filenames and a blank link to make visually reading easier #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ use std::{ | |
path::Path, | ||
rc::Rc, | ||
}; | ||
use ansi_term::Colour::Green; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In rust its common to let |
||
|
||
fn app() -> App<'static, 'static> { | ||
clap_app!(cepler => | ||
|
@@ -40,8 +41,9 @@ pub fn run() -> anyhow::Result<()> { | |
combos.dedup(); | ||
combos.reverse(); | ||
for combo in combos { | ||
println!(""); | ||
for file in combo.iter() { | ||
println!("# {}", file); | ||
println!("# {}", Green.paint(file)); | ||
} | ||
println!( | ||
"{}", | ||
|
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.
Rust can handle different versions of the same crate being in the source tree. I'd just use the latest version
0.12
. The code where you use it does not interact with anything related toclap
so there is no problem.