diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-18 12:15:36 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-18 12:15:36 -0400 |
commit | 9c3d4d94745161ee97a365a5c803c3084d2f7823 (patch) | |
tree | 2196b0c6c53601cb0dbc26bc80395e896a234fd3 /src/main.rs | |
parent | c61675cf302f0b65d5e77810cfdc5aca5fffde48 (diff) |
add debug flag
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index b4df990..e72dd0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,13 +49,22 @@ lazy_static! { } #[derive(StructOpt, Debug)] -pub struct Args {} +pub struct Args { + #[structopt(short = "d", long = "debug")] + debug: bool, +} fn main() { - let _ = Args::from_args(); + let args = Args::from_args(); let config = JoshutoConfig::get_config(); let keymap = JoshutoKeymap::get_config(); + if args.debug { + eprintln!("config: {:#?}", config); + eprintln!("theme config: {:#?}", *THEME_T); + eprintln!("mimetype config: {:#?}", *MIMETYPE_T); + } + run(config, keymap); } |