Added --stdin-data argument

This argument accepts a path to a file. The data contained in the file will be passed to the command via stdin.

Closes sharkdp/hyperfine#541
This commit is contained in:
Steve Nease authored and David Peter committed 2023-03-15 09:33:49 +01:00
1 parent 531fee3188
commit e38acdb683
6 files changed
+91 -3

No files matched your search

+8
View File
@@ -312,6 +312,14 @@ fn build_command() -> Command {
.hide(true)
.help("Enable debug mode which does not actually run commands, but returns fake times when the command is 'sleep <time>'.")
)
.arg(
Arg::new("stdin-data")
.long("stdin-data")
.takes_value(true)
.number_of_values(1)
.value_name("FILE")
.help("Path to file containing stdin data to provide to the command"),
)
}
#[test]