-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vahe Danielyan
committed
Jan 6, 2024
1 parent
93e3810
commit 9dffd6d
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
use clap_mangen::Man; | ||
use std::env; | ||
|
||
include!("src/args.rs"); // Adjust the path to where your Cli struct is defined | ||
|
||
fn main() { | ||
let app = Args::command(); | ||
let mut file = File::create("dirdiff.1").expect("Could not create man page file"); | ||
let out_dir = std::path::PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
let mut file = File::create(out_dir.join("dirdiff.1")).expect("Could not create man page file"); | ||
Man::new(app).render(&mut file).expect("Could not render man page"); | ||
} | ||
|