aboutsummaryrefslogtreecommitdiff
path: root/mling/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mling/src/cli.rs')
-rw-r--r--mling/src/cli.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/mling/src/cli.rs b/mling/src/cli.rs
index 65ba02a..465d813 100644
--- a/mling/src/cli.rs
+++ b/mling/src/cli.rs
@@ -20,12 +20,6 @@ pub mod install;
pub use install::*;
pub fn cli_entry() {
- // Facade
- if std::env::args().len() == 1 {
- println!("{}", include_str!("../res/guide.txt").trim_end());
- return;
- }
-
let mut program = ThisProgram::new();
// Plugins
@@ -33,6 +27,11 @@ pub fn cli_entry() {
program.with_setup(GeneralRendererSetup);
program.with_dispatcher(CompletionDispatcher);
+ if program.pick_global_flag(["-v", "--version"]) {
+ println!("{}", include_str!("../res/version.txt").trim_end());
+ return;
+ }
+
// Help
if program.user_context.help {
println!(