@@ -30,14 +30,14 @@ impl Args {
30
30
pub fn parse ( ) -> Self {
31
31
use clap:: { Arg , ArgGroup , Command } ;
32
32
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"# ;
34
34
35
35
let app = Command :: new ( crate :: consts:: PROGRAM_NAME )
36
36
. version ( version)
37
37
. about ( about)
38
38
. arg ( Arg :: new ( "script" )
39
39
. index ( 1 )
40
- . help ( "Script file or expression to execute. " )
40
+ . help ( "Script file or expression to execute" )
41
41
. required_unless_present_any ( if cfg ! ( windows) {
42
42
[ "clear-cache" , "install-file-association" , "uninstall-file-association" ] . iter ( )
43
43
} else {
@@ -52,14 +52,14 @@ impl Args {
52
52
. trailing_var_arg ( true )
53
53
)
54
54
. 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" )
56
56
. long ( "expr" )
57
57
. short ( 'e' )
58
58
. action ( ArgAction :: SetTrue )
59
59
. requires ( "script" )
60
60
)
61
61
. 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" )
63
63
. long ( "loop" )
64
64
. short ( 'l' )
65
65
. action ( ArgAction :: SetTrue )
@@ -72,39 +72,39 @@ impl Args {
72
72
Options that impact the script being executed.
73
73
*/
74
74
. arg ( Arg :: new ( "cargo-output" )
75
- . help ( "Show output from cargo when building. " )
75
+ . help ( "Show output from cargo when building" )
76
76
. short ( 'c' )
77
77
. long ( "cargo-output" )
78
78
. action ( ArgAction :: SetTrue )
79
79
. requires ( "script" )
80
80
)
81
81
. 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" )
83
83
. long ( "count" )
84
84
. action ( ArgAction :: SetTrue )
85
85
. requires ( "loop" )
86
86
)
87
87
. arg ( Arg :: new ( "debug" )
88
- . help ( "Build a debug executable, not an optimised one. " )
88
+ . help ( "Build a debug executable, not an optimised one" )
89
89
. long ( "debug" )
90
90
. action ( ArgAction :: SetTrue )
91
91
)
92
92
. 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`" )
94
94
. long ( "dep" )
95
95
. short ( 'd' )
96
96
. num_args ( 1 ..)
97
97
. number_of_values ( 1 )
98
98
)
99
99
. 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" )
101
101
. long ( "extern" )
102
102
. short ( 'x' )
103
103
. num_args ( 1 ..)
104
104
. requires ( "expr_or_loop" )
105
105
)
106
106
. arg ( Arg :: new ( "unstable_features" )
107
- . help ( "Add a #![feature] declaration to the crate. " )
107
+ . help ( "Add a #![feature] declaration to the crate" )
108
108
. long ( "unstable-feature" )
109
109
. short ( 'u' )
110
110
. num_args ( 1 ..)
@@ -115,47 +115,47 @@ impl Args {
115
115
Options that change how rust-script itself behaves, and don't alter what the script will do.
116
116
*/
117
117
. arg ( Arg :: new ( "clear-cache" )
118
- . help ( "Clears out the script cache. " )
118
+ . help ( "Clears out the script cache" )
119
119
. long ( "clear-cache" )
120
120
. exclusive ( true )
121
121
. action ( ArgAction :: SetTrue ) ,
122
122
)
123
123
. arg ( Arg :: new ( "force" )
124
- . help ( "Force the script to be rebuilt. " )
124
+ . help ( "Force the script to be rebuilt" )
125
125
. long ( "force" )
126
126
. short ( 'f' )
127
127
. action ( ArgAction :: SetTrue )
128
128
. requires ( "script" )
129
129
)
130
130
. 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" )
132
132
. long ( "package" )
133
133
. short ( 'p' )
134
134
. action ( ArgAction :: SetTrue )
135
135
. requires ( "script" )
136
136
. conflicts_with_all ( [ "debug" , "force" , "test" , "bench" ] )
137
137
)
138
138
. 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" )
140
140
. long ( "pkg-path" )
141
141
. num_args ( 1 )
142
142
. requires ( "script" )
143
143
. conflicts_with_all ( [ "clear-cache" , "force" ] )
144
144
)
145
145
. arg ( Arg :: new ( "test" )
146
- . help ( "Compile and run tests. " )
146
+ . help ( "Compile and run tests" )
147
147
. long ( "test" )
148
148
. action ( ArgAction :: SetTrue )
149
149
. conflicts_with_all ( [ "bench" , "debug" , "force" ] )
150
150
)
151
151
. arg ( Arg :: new ( "bench" )
152
- . help ( "Compile and run benchmarks. Requires a nightly toolchain. " )
152
+ . help ( "Compile and run benchmarks. Requires a nightly toolchain" )
153
153
. long ( "bench" )
154
154
. action ( ArgAction :: SetTrue )
155
155
. conflicts_with_all ( [ "test" , "debug" , "force" ] )
156
156
)
157
157
. arg ( Arg :: new ( "toolchain" )
158
- . help ( "Build the script using the given toolchain version. " )
158
+ . help ( "Build the script using the given toolchain version" )
159
159
. long ( "toolchain" )
160
160
. short ( 't' )
161
161
. num_args ( 1 )
@@ -167,15 +167,15 @@ impl Args {
167
167
let app = app
168
168
. arg (
169
169
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" )
171
171
. long ( "install-file-association" )
172
172
. exclusive ( true )
173
173
. action ( ArgAction :: SetTrue ) ,
174
174
)
175
175
. arg (
176
176
Arg :: new ( "uninstall-file-association" )
177
177
. 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" ,
179
179
)
180
180
. long ( "uninstall-file-association" )
181
181
. exclusive ( true )
0 commit comments