aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-05-31 08:14:49 +0000
committerBlaž Hrastnik2021-05-31 08:14:49 +0000
commitb8d6e6ad28a116c9dff50e0e605189e2489afdba (patch)
tree716074efb9e5ec47c0cc80e9d4913cfc7e10d84a
parent5825bce0e47433319e7a9608bb8883c494e39a46 (diff)
Allow setting verbosity to info again
-rw-r--r--helix-term/src/main.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 9ca5b067..ac060bbe 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -83,15 +83,18 @@ FLAGS:
std::process::exit(0);
}
- let args = Args {
- files: pargs.finish().into_iter().map(|arg| arg.into()).collect(),
- };
+ let mut verbosity: u64 = 0;
- // let verbosity: u64 = args.occurrences_of("verbose");
- let verbosity: u64 = 0;
+ if pargs.contains("-v") {
+ verbosity = 1;
+ }
setup_logging(verbosity).expect("failed to initialize logging.");
+ let args = Args {
+ files: pargs.finish().into_iter().map(|arg| arg.into()).collect(),
+ };
+
// initialize language registry
use helix_core::config_dir;
use helix_core::syntax::{Loader, LOADER};