mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-28 08:05:52 +00:00
Help text adjustments, do not require group-size to be present
This commit is contained in:
1 parent
b251575d94
commit
20450310c9
1 file changed
+17
-14
+17
-14
@@ -174,8 +174,23 @@ fn run() -> Result<()> {
|
|||||||
.value_name("N")
|
.value_name("N")
|
||||||
.help(
|
.help(
|
||||||
"Number of bytes/octets that should be grouped together. \
|
"Number of bytes/octets that should be grouped together. \
|
||||||
Possible group sizes are 1, 2, 4, 8. The default is 1. \
|
Possible group sizes are 1, 2, 4, 8. The default is 1. You \
|
||||||
'--groupsize can be used as an alias (xxd-compatibility).",
|
can use the '--endianness' option to control the ordering of \
|
||||||
|
the bytes within a group. '--groupsize' can be used as an \
|
||||||
|
alias (xxd-compatibility).",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::new("endianness")
|
||||||
|
.long("endianness")
|
||||||
|
.num_args(1)
|
||||||
|
.value_name("FORMAT")
|
||||||
|
.value_parser(["big", "little"])
|
||||||
|
.default_value("big")
|
||||||
|
.help(
|
||||||
|
"Whether to print out groups in little-endian or big-endian \
|
||||||
|
format. This option only has an effect if the '--group-size' \
|
||||||
|
is larger than 1.",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
@@ -203,18 +218,6 @@ fn run() -> Result<()> {
|
|||||||
width but still leave some space to the right.\nCannot be used with other \
|
width but still leave some space to the right.\nCannot be used with other \
|
||||||
width-setting options.",
|
width-setting options.",
|
||||||
),
|
),
|
||||||
)
|
|
||||||
.arg(
|
|
||||||
Arg::new("endianness")
|
|
||||||
.long("endianness")
|
|
||||||
.requires("group_size")
|
|
||||||
.num_args(1)
|
|
||||||
.value_name("ENDIANNESS")
|
|
||||||
.value_parser(["big", "little"])
|
|
||||||
.default_value("big")
|
|
||||||
.help(
|
|
||||||
"Whether to print out the data in little endian format or big endian format.",
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let matches = command.get_matches();
|
let matches = command.get_matches();
|
||||||
|
|||||||
Reference in new issue
Block a user