Skip to content

Commit

Permalink
show version via cli with --version
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Mar 15, 2024
1 parent eba1785 commit 6de9640
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 3 deletions.
117 changes: 115 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tokio = { version = "1", features = ["full"] }
dirs = "5"
toml = { version = "0.8" }
serde = { version = "1", features = ["derive"] }
clap = { version = "4", features = ["derive", "cargo"] }

[profile.release]
strip = true
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ use bluetui::config::Config;
use bluetui::event::{Event, EventHandler};
use bluetui::handler::handle_key_events;
use bluetui::tui::Tui;
use clap::{crate_version, Command};
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;
use std::io;
use std::sync::Arc;

#[tokio::main]
async fn main() -> AppResult<()> {
let config = Arc::new(Config::new());
Command::new("bluetui")
.version(crate_version!())
.get_matches();

let config = Arc::new(Config::new());
let mut app = App::new(config.clone()).await?;
let backend = CrosstermBackend::new(io::stderr());
let terminal = Terminal::new(backend)?;
Expand Down

0 comments on commit 6de9640

Please sign in to comment.