Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
vypxl committed Oct 22, 2019
1 parent 2e0ac38 commit 0f3b82e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,18 @@ Possible values: [{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}]",
)
.arg(
Arg::with_name("list")
.short("l")
.long("list")
.help("Prints a list of all supported languages")
.short("l")
.long("list")
.help("Prints a list of all supported languages"),
)
.get_matches();

if matches.is_present("list") {
let list = Language::iter()
.filter(|x| *x != Language::Unknown)
.map(|x| x.to_string().color(x.get_colors()[0]).to_string())
.collect::<Vec<String>>().join(", ");
.collect::<Vec<String>>()
.join(", ");

print!("Supported languages:\n\n{}\n", list);
std::process::exit(0);
Expand Down

0 comments on commit 0f3b82e

Please sign in to comment.