Skip to content

Commit

Permalink
Merge pull request #28 from hartwork/improve-help-output
Browse files Browse the repository at this point in the history
Document positional arguments in --help output
  • Loading branch information
hartwork committed Jun 18, 2023
2 parents 2f75aae + 4bfdd15 commit c6e4221
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/command_line_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ pub fn command() -> Command {
.num_args(0..)
.help("Service to test via the TCP protocol; can be passed multiple times"),
)
.arg(Arg::new("command").num_args(0..))
.arg(
Arg::new("command")
.num_args(0..)
.help("Command to run after waiting;\nincludes command arguments, resolved against ${PATH}"),
)
}

#[cfg(test)]
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ fn test_middle_main() {
Usage: rust-for-it [OPTIONS] [command]...
Arguments:
[command]...
[command]... Command to run after waiting;
includes command arguments, resolved against ${PATH}
Options:
-q, --quiet Do not output any status messages
Expand Down

0 comments on commit c6e4221

Please sign in to comment.