Skip to content

Commit

Permalink
add --version -v flag fix #177
Browse files Browse the repository at this point in the history
  • Loading branch information
Feel-ix-343 committed Oct 12, 2024
1 parent b69d9e6 commit d673a6a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,15 @@ async fn jump_to_specific(
commands::jump(client, root_dir, settings, Some(day)).await
}

use std::env;

#[tokio::main]
async fn main() {
if env::args().any(|arg| arg == "--version" || arg == "-v") {
println!("markdown-oxide v{}", env!("CARGO_PKG_VERSION"));
return;
}

let stdin = tokio::io::stdin();
let stdout = tokio::io::stdout();

Expand Down

0 comments on commit d673a6a

Please sign in to comment.