diff options
author | David Peter <mail@david-peter.de> | 2023-05-10 22:09:19 +0200 |
---|---|---|
committer | David Peter <david.peter@bosch.com> | 2023-05-10 22:09:19 +0200 |
commit | 5f0373184fff5b66770a7591e2581aaf21fe3ae2 (patch) | |
tree | ed41f151062f65bd49a2126ad8513ce0843d617f /src | |
parent | 57d18482bab3fba9b13f723cc204e4a3a5ead097 (diff) |
Add --characters, change meaning of -C
This changes the meaning of `-C` to "show the character panel". The long
version `--no-characters` can still be used to hide the character panel.
closes #187
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/hexyl.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/hexyl.rs b/src/bin/hexyl.rs index f59640d..5456c32 100644 --- a/src/bin/hexyl.rs +++ b/src/bin/hexyl.rs @@ -128,10 +128,17 @@ fn run() -> Result<()> { )) .arg( Arg::new("no_chars") - .short('C') .long("no-characters") .action(ArgAction::SetFalse) - .help("Whether to display the character panel on the right."), + .help("Do not show the character panel on the right."), + ) + .arg( + Arg::new("chars") + .short('C') + .long("characters") + .overrides_with("no_chars") + .action(ArgAction::SetTrue) + .help("Show the character panel on the right. This is the default, unless --no-characters has been specified."), ) .arg( Arg::new("no_position") |