Skip to content

Commit 730ceb9

Browse files
authored
Merge pull request #39 from jirutka/patch-2
Capitalize string “show this help message and exit”
2 parents 2eac7bc + 3b02578 commit 730ceb9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ what we have now::
6565
Greet somebody.
6666

6767
Optional arguments:
68-
-h, --help show this help message and exit
68+
-h, --help Show this help message and exit
6969
-v, --verbose
7070
Be verbose
7171
--name NAME Name for the greeting

src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ impl<'parser> ArgumentParser<'parser> {
638638
silence_double_dash: true,
639639
};
640640
ap.add_option_for(None, &["-h", "--help"], Flag(Box::new(HelpAction)),
641-
"show this help message and exit");
641+
"Show this help message and exit");
642642
return ap;
643643
}
644644

src/test_help.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn test_empty() {
1515
+ "Test program\n"
1616
+ "\n"
1717
+ "Optional arguments:\n"
18-
+ " -h,--help show this help message and exit\n"
18+
+ " -h,--help Show this help message and exit\n"
1919
, from_utf8(&buf[..]).unwrap().to_string());
2020
}
2121

@@ -43,7 +43,7 @@ we want to test how word wrapping works for it. So some more text would be ok
4343
for the test\n"
4444
+ "\n"
4545
+ "Optional arguments:\n"
46-
+ " -h,--help show this help message and exit\n"
46+
+ " -h,--help Show this help message and exit\n"
4747
+ " --value VALUE Set integer value\n"
4848
+ " -L,--long-option LONG_OPTION\n"
4949
+ " Long option value\n"
@@ -69,7 +69,7 @@ fn test_argument() {
6969
+ " value Integer value\n"
7070
+ "\n"
7171
+ "Optional arguments:\n"
72-
+ " -h,--help show this help message and exit\n"
72+
+ " -h,--help Show this help message and exit\n"
7373
, from_utf8(&buf[..]).unwrap().to_string());
7474
}
7575

@@ -97,7 +97,7 @@ fn test_arguments() {
9797
+ " v2 More values\n"
9898
+ "\n"
9999
+ "Optional arguments:\n"
100-
+ " -h,--help show this help message and exit\n"
100+
+ " -h,--help Show this help message and exit\n"
101101
, from_utf8(&buf[..]).unwrap().to_string());
102102
}
103103

@@ -127,7 +127,7 @@ fn test_req_arguments() {
127127
+ " v2 More values\n"
128128
+ "\n"
129129
+ "Optional arguments:\n"
130-
+ " -h,--help show this help message and exit\n"
130+
+ " -h,--help Show this help message and exit\n"
131131
, from_utf8(&buf[..]).unwrap().to_string());
132132
}
133133

@@ -148,7 +148,7 @@ fn test_metavar() {
148148
+ "Test program.\n"
149149
+ "\n"
150150
+ "Optional arguments:\n"
151-
+ " -h,--help show this help message and exit\n"
151+
+ " -h,--help Show this help message and exit\n"
152152
+ " -L,--long-option VAL Long option value\n"
153153
, from_utf8(&buf[..]).unwrap().to_string());
154154
}

0 commit comments

Comments
 (0)