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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
use serde_derive::{Deserialize, Serialize};
use std::path::PathBuf;
use structopt::{clap, StructOpt};
use structopt_toml::StructOptToml;
#[derive(Debug, Deserialize, Serialize, StructOpt, StructOptToml)]
#[serde(default)]
#[structopt(name = "ptags")]
#[structopt(long_version = option_env!("LONG_VERSION").unwrap_or(env!("CARGO_PKG_VERSION")))]
#[structopt(setting = clap::AppSettings::AllowLeadingHyphen)]
#[structopt(setting = clap::AppSettings::ColoredHelp)]
pub struct Opt {
#[structopt(short = "t", long = "thread", default_value = "8")]
pub thread: usize,
#[structopt(short = "f", long = "file", default_value = "tags", parse(from_os_str))]
pub output: PathBuf,
#[structopt(name = "DIR", default_value = ".", parse(from_os_str))]
pub dir: PathBuf,
#[structopt(short = "s", long = "stat")]
pub stat: bool,
#[structopt(short = "L", long = "list")]
pub list: Option<String>,
#[structopt(long = "bin-ctags", default_value = "ctags", parse(from_os_str))]
pub bin_ctags: PathBuf,
#[structopt(long = "bin-git", default_value = "git", parse(from_os_str))]
pub bin_git: PathBuf,
#[structopt(short = "c", long = "opt-ctags", number_of_values = 1)]
pub opt_ctags: Vec<String>,
#[structopt(short = "g", long = "opt-git", number_of_values = 1)]
pub opt_git: Vec<String>,
#[structopt(long = "opt-git-lfs", number_of_values = 1)]
pub opt_git_lfs: Vec<String>,
#[structopt(short = "v", long = "verbose")]
pub verbose: bool,
#[structopt(long = "exclude-lfs")]
pub exclude_lfs: bool,
#[structopt(long = "include-untracked")]
pub include_untracked: bool,
#[structopt(long = "include-ignored")]
pub include_ignored: bool,
#[structopt(long = "include-submodule")]
pub include_submodule: bool,
#[structopt(long = "validate-utf8")]
pub validate_utf8: bool,
#[structopt(long = "unsorted")]
pub unsorted: bool,
#[structopt(long = "fields")]
pub fields: Option<String>,
#[structopt(long = "languages")]
pub languages: Option<String>,
#[structopt(short = "e", long = "exclude", number_of_values = 1)]
pub exclude: Vec<String>,
#[structopt(
long = "completion",
possible_values = &["bash", "fish", "zsh", "powershell"]
)]
pub completion: Option<String>,
#[structopt(long = "config")]
pub config: bool,
}