Compare commits
No commits in common. "ad7fc4e0cd18fa623d5727dae9480b43cd1bb593" and "9bac43bf5d4a9a0b8ac1430da65181fd59d4fd44" have entirely different histories.
ad7fc4e0cd
...
9bac43bf5d
3 changed files with 2 additions and 15 deletions
|
@ -20,7 +20,7 @@ path = "src/main.rs"
|
|||
|
||||
[dependencies]
|
||||
pico-args = "0.5.0"
|
||||
termion = "4.0.3"
|
||||
termion = "3.0.0"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 's'
|
||||
|
|
|
@ -82,13 +82,6 @@ The rainbow flag designed for 2017 Philadelphia Pride.
|
|||
.It Ic transgender, trans
|
||||
The transgender pride flag designed by Monica Helms in 1999.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width Ds
|
||||
.It PRIDE_DEFAULT
|
||||
A string containing the name of a flag to use as the default when no
|
||||
.Ar flag
|
||||
argument is provided.
|
||||
.El
|
||||
.Sh EXIT STATUS
|
||||
.Bl -tag -width Ds
|
||||
.It 1
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//! main method module
|
||||
use std::env::var;
|
||||
|
||||
use pico_args::Arguments;
|
||||
|
||||
|
@ -51,12 +50,7 @@ fn main() {
|
|||
|
||||
let state = State::new(&mut args);
|
||||
|
||||
let subcommand =
|
||||
if let Ok(Some(subcommand)) = args.subcommand() { Some(subcommand) }
|
||||
else if let Ok(default) = var("PRIDE_DEFAULT") {
|
||||
if default.is_empty() { None }
|
||||
else { Some(default) }
|
||||
} else { None };
|
||||
let subcommand = args.subcommand().unwrap();
|
||||
let variant = args.subcommand().unwrap();
|
||||
|
||||
// get color vec from matched flag
|
||||
|
|
Loading…
Reference in a new issue