From f15e049bf591e91871f7cfa74ba40d5ced247f71 Mon Sep 17 00:00:00 2001 From: Mikhail Katychev Date: Sat, 21 May 2022 16:06:44 -0500 Subject: [PATCH] added proposed table suffix to no_chars and no_position --- src/bin/hexyl.rs | 17 +++++------------ tests/integration_tests.rs | 4 ++-- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/bin/hexyl.rs b/src/bin/hexyl.rs index 9866ae6..b05aaa6 100644 --- a/src/bin/hexyl.rs +++ b/src/bin/hexyl.rs @@ -111,12 +111,9 @@ fn run() -> Result<(), AnyhowError> { goes to an interactive terminal", ), ) - .arg( - Arg::with_name("plain") - .short("p") - .long("plain") - .help("Display output with --no-chars, --no-position, and --border=none."), - ) + .arg(Arg::with_name("plain").short("p").long("plain").help( + "Display output with --no-character-table, --no-position-table, --border=none, and --color=never.", + )) .arg( Arg::with_name("border") .long("border") @@ -133,15 +130,13 @@ fn run() -> Result<(), AnyhowError> { .arg( Arg::with_name("no_chars") .short("C") - .long("no-chars") - .conflicts_with("plain") + .long("no-charcter-table") .help("Whether to display the character table on the right."), ) .arg( Arg::with_name("no_position") .short("P") - .long("no-position") - .conflicts_with("plain") + .long("no-position-table") .help("Whether to display the position indicator on the left."), ) .arg( @@ -259,8 +254,6 @@ fn run() -> Result<(), AnyhowError> { let squeeze = !matches.is_present("nosqueezing"); - // -nc true && false - // -plain true && false let show_char_table = !matches.is_present("no_chars") && !matches.is_present("plain"); let show_position_indicator = diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 9aef33a..95da56e 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -245,7 +245,7 @@ mod display_settings { fn no_chars() { hexyl() .arg("ascii") - .arg("--no-chars") + .arg("--no-charcter-table") .arg("--color=never") .assert() .success() @@ -260,7 +260,7 @@ mod display_settings { fn no_position() { hexyl() .arg("ascii") - .arg("--no-position") + .arg("--no-position-table") .arg("--color=never") .assert() .success()