mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-20 07:04:18 +02:00
Implement --version flag
This commit is contained in:
parent
d4a43212cd
commit
5c75798d19
1 changed files with 4 additions and 2 deletions
|
|
@ -28,6 +28,8 @@ use error::TldrError;
|
|||
use formatter::print_lines;
|
||||
|
||||
|
||||
const NAME: &'static str = "tldr-rs";
|
||||
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||
const USAGE: &'static str = "
|
||||
Usage:
|
||||
|
||||
|
|
@ -104,8 +106,8 @@ fn main() {
|
|||
println!("{:#?}", args);
|
||||
|
||||
if args.flag_version {
|
||||
println!("Flag --version not yet implemented.");
|
||||
process::exit(1);
|
||||
println!("{} v{}", NAME, VERSION);
|
||||
process::exit(0);
|
||||
}
|
||||
if args.flag_list {
|
||||
println!("Flag --list not yet implemented.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue