1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Integration with [clap](https://docs.rs/clap).
use PossibleValue;
use ;
/// Returns a [`clap::Arg`].
///
/// # Example
///
/// ```
/// use clap::{Arg, Command};
///
/// let cli = Command::new("mytool")
/// .arg(archive_rs::clap::list_archive_formats());
///
/// let args = cli.get_matches_from(vec![
/// "mytool", "--list-archive-formats",
/// ]);
///
/// if args.get_flag("list-archive-formats") {
/// for x in archive_rs::support::Format::all_file_endings() {
/// println!("{}", x);
/// }
/// }
/// ```