1 use std::path::PathBuf;
3 use clap::{Parser, ValueHint};
5 /// Command line options
6 #[derive(Parser, Debug)]
7 #[clap(version, about)]
9 /// Skip [Y/n] questions positively.
10 #[clap(short, long, conflicts_with = "no")]
13 /// Skip [Y/n] questions negatively.
17 /// Ouch and claps subcommands
22 // CAREFUL: this docs can accidentally become part of the --help message if they get too long
23 // this was tested in clap 3.0.0-beta5.
24 /// Repository: https://github.com/ouch-org/ouch
33 #[derive(Parser, PartialEq, Eq, Debug)]
35 /// Compress one or more files into one output file.
38 /// Files to be compressed.
39 #[clap(required = true, min_values = 1)]
42 /// The resulting file. Its extensions can be used to specify the compression formats.
43 #[clap(required = true, value_hint = ValueHint::FilePath)]
46 /// Decompresses one or more files, optionally into another folder.
49 /// Files to be decompressed.
50 #[clap(required = true, min_values = 1)]
53 /// Choose to files in a directory other than the current
54 #[clap(short = 'd', long = "dir", value_hint = ValueHint::DirPath)]
55 output_dir: Option<PathBuf>,
57 /// List contents. Alias: l
60 /// Archives whose contents should be listed
61 #[clap(required = true, min_values = 1)]
62 archives: Vec<PathBuf>,
64 /// Show archive contents as a tree