Skip to content

Commit 341f006

Browse files
committed
Remove periods for CLI options help texts
1 parent 6a065e6 commit 341f006

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/arguments.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ impl Args {
3030
pub fn parse() -> Self {
3131
use clap::{Arg, ArgGroup, Command};
3232
let version = option_env!("CARGO_PKG_VERSION").unwrap_or("unknown");
33-
let about = r#"Compiles and runs a Rust script."#;
33+
let about = r#"Compiles and runs a Rust script"#;
3434

3535
let app = Command::new(crate::consts::PROGRAM_NAME)
3636
.version(version)
3737
.about(about)
3838
.arg(Arg::new("script")
3939
.index(1)
40-
.help("Script file or expression to execute.")
40+
.help("Script file or expression to execute")
4141
.required_unless_present_any(if cfg!(windows) {
4242
["clear-cache", "install-file-association", "uninstall-file-association"].iter()
4343
} else {
@@ -52,14 +52,14 @@ impl Args {
5252
.trailing_var_arg(true)
5353
)
5454
.arg(Arg::new("expr")
55-
.help("Execute <script> as a literal expression and display the result.")
55+
.help("Execute <script> as a literal expression and display the result")
5656
.long("expr")
5757
.short('e')
5858
.action(ArgAction::SetTrue)
5959
.requires("script")
6060
)
6161
.arg(Arg::new("loop")
62-
.help("Execute <script> as a literal closure once for each line from stdin.")
62+
.help("Execute <script> as a literal closure once for each line from stdin")
6363
.long("loop")
6464
.short('l')
6565
.action(ArgAction::SetTrue)
@@ -72,39 +72,39 @@ impl Args {
7272
Options that impact the script being executed.
7373
*/
7474
.arg(Arg::new("cargo-output")
75-
.help("Show output from cargo when building.")
75+
.help("Show output from cargo when building")
7676
.short('c')
7777
.long("cargo-output")
7878
.action(ArgAction::SetTrue)
7979
.requires("script")
8080
)
8181
.arg(Arg::new("count")
82-
.help("Invoke the loop closure with two arguments: line, and line number.")
82+
.help("Invoke the loop closure with two arguments: line, and line number")
8383
.long("count")
8484
.action(ArgAction::SetTrue)
8585
.requires("loop")
8686
)
8787
.arg(Arg::new("debug")
88-
.help("Build a debug executable, not an optimised one.")
88+
.help("Build a debug executable, not an optimised one")
8989
.long("debug")
9090
.action(ArgAction::SetTrue)
9191
)
9292
.arg(Arg::new("dep")
93-
.help("Add a dependency - either just the package name (for the latest version) or as `name=version`.")
93+
.help("Add a dependency - either just the package name (for the latest version) or as `name=version`")
9494
.long("dep")
9595
.short('d')
9696
.num_args(1..)
9797
.number_of_values(1)
9898
)
9999
.arg(Arg::new("extern")
100-
.help("Adds an `#[macro_use] extern crate name;` item for expressions and loop scripts.")
100+
.help("Adds an `#[macro_use] extern crate name;` item for expressions and loop scripts")
101101
.long("extern")
102102
.short('x')
103103
.num_args(1..)
104104
.requires("expr_or_loop")
105105
)
106106
.arg(Arg::new("unstable_features")
107-
.help("Add a #![feature] declaration to the crate.")
107+
.help("Add a #![feature] declaration to the crate")
108108
.long("unstable-feature")
109109
.short('u')
110110
.num_args(1..)
@@ -115,47 +115,47 @@ impl Args {
115115
Options that change how rust-script itself behaves, and don't alter what the script will do.
116116
*/
117117
.arg(Arg::new("clear-cache")
118-
.help("Clears out the script cache.")
118+
.help("Clears out the script cache")
119119
.long("clear-cache")
120120
.exclusive(true)
121121
.action(ArgAction::SetTrue),
122122
)
123123
.arg(Arg::new("force")
124-
.help("Force the script to be rebuilt.")
124+
.help("Force the script to be rebuilt")
125125
.long("force")
126126
.short('f')
127127
.action(ArgAction::SetTrue)
128128
.requires("script")
129129
)
130130
.arg(Arg::new("gen_pkg_only")
131-
.help("Generate the Cargo package and print the path to it, but don't compile or run it.")
131+
.help("Generate the Cargo package and print the path to it, but don't compile or run it")
132132
.long("package")
133133
.short('p')
134134
.action(ArgAction::SetTrue)
135135
.requires("script")
136136
.conflicts_with_all(["debug", "force", "test", "bench"])
137137
)
138138
.arg(Arg::new("pkg_path")
139-
.help("Specify where to place the generated Cargo package.")
139+
.help("Specify where to place the generated Cargo package")
140140
.long("pkg-path")
141141
.num_args(1)
142142
.requires("script")
143143
.conflicts_with_all(["clear-cache", "force"])
144144
)
145145
.arg(Arg::new("test")
146-
.help("Compile and run tests.")
146+
.help("Compile and run tests")
147147
.long("test")
148148
.action(ArgAction::SetTrue)
149149
.conflicts_with_all(["bench", "debug", "force"])
150150
)
151151
.arg(Arg::new("bench")
152-
.help("Compile and run benchmarks. Requires a nightly toolchain.")
152+
.help("Compile and run benchmarks. Requires a nightly toolchain")
153153
.long("bench")
154154
.action(ArgAction::SetTrue)
155155
.conflicts_with_all(["test", "debug", "force"])
156156
)
157157
.arg(Arg::new("toolchain")
158-
.help("Build the script using the given toolchain version.")
158+
.help("Build the script using the given toolchain version")
159159
.long("toolchain")
160160
.short('t')
161161
.num_args(1)
@@ -167,15 +167,15 @@ impl Args {
167167
let app = app
168168
.arg(
169169
Arg::new("install-file-association")
170-
.help("Install a file association so that rust-script executes .ers files.")
170+
.help("Install a file association so that rust-script executes .ers files")
171171
.long("install-file-association")
172172
.exclusive(true)
173173
.action(ArgAction::SetTrue),
174174
)
175175
.arg(
176176
Arg::new("uninstall-file-association")
177177
.help(
178-
"Uninstall the file association that makes rust-script execute .ers files.",
178+
"Uninstall the file association that makes rust-script execute .ers files",
179179
)
180180
.long("uninstall-file-association")
181181
.exclusive(true)

0 commit comments

Comments
 (0)