From 7bb6343d2a0a8dfe720d51c5344d956606b85fda Mon Sep 17 00:00:00 2001 From: Sharif Haason Date: Sun, 27 Nov 2022 17:16:48 -0500 Subject: [PATCH] Add `--base`/`-b` argument --- src/bin/hexyl.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/bin/hexyl.rs b/src/bin/hexyl.rs index 4b4cf5b..a27e6e8 100644 --- a/src/bin/hexyl.rs +++ b/src/bin/hexyl.rs @@ -177,6 +177,17 @@ fn run() -> Result<(), AnyhowError> { The possible options are 1, 2, 4, 8. The default is 1", ), ) + .arg( + Arg::new("base") + .short('b') + .long("base") + .num_args(1) + .value_name("B") + .help( + "Sets the base used for the bytes. The possible options are \ + binary, octal, decimal, and hexadecimal." + ) + ) .arg( Arg::new("terminal_width") .long("terminal-width")