diff options
author | David Peter <mail@david-peter.de> | 2023-04-25 08:48:39 +0200 |
---|---|---|
committer | David Peter <david.peter@bosch.com> | 2023-04-25 08:48:39 +0200 |
commit | 20450310c9a3bb75ab2725fe04ea49dfcd9395fb (patch) | |
tree | 1a19bc4fca49d5fe843c655a6d417751c80d0f89 | |
parent | b251575d94b74cd789a0f9ae4eb3f5eaae605e3e (diff) |
Help text adjustments, do not require group-size to be present
-rw-r--r-- | src/bin/hexyl.rs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/bin/hexyl.rs b/src/bin/hexyl.rs index 99554cb..cc7fe8f 100644 --- a/src/bin/hexyl.rs +++ b/src/bin/hexyl.rs @@ -174,8 +174,23 @@ fn run() -> Result<()> { .value_name("N") .help( "Number of bytes/octets that should be grouped together. \ - Possible group sizes are 1, 2, 4, 8. The default is 1. \ - '--groupsize can be used as an alias (xxd-compatibility).", + Possible group sizes are 1, 2, 4, 8. The default is 1. You \ + 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( @@ -203,18 +218,6 @@ fn run() -> Result<()> { width but still leave some space to the right.\nCannot be used with other \ 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(); |