From 74047ec55e2af600eece01ae55d76679fcf419c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Thu, 12 Mar 2026 18:36:27 +0000 Subject: [PATCH] cut: adjust error message to be less specific * src/cut.c (main): Cater for both misplaced -w and -d. --- src/cut.c | 4 ++-- tests/cut/cut.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cut.c b/src/cut.c index 65fc66427..7381395d6 100644 --- a/src/cut.c +++ b/src/cut.c @@ -1069,8 +1069,8 @@ main (int argc, char **argv) if (cut_mode == CUT_MODE_BYTES || cut_mode == CUT_MODE_CHARACTERS) { if (delim_specified || whitespace_delimited) - FATAL_ERROR (_("an input delimiter may be specified only\ - when operating on fields")); + FATAL_ERROR (_("an input delimiter makes sense\n\ +\tonly when operating on fields")); if (suppress_non_delimited) FATAL_ERROR (_("suppressing non-delimited lines makes sense\n\ diff --git a/tests/cut/cut.pl b/tests/cut/cut.pl index 0e378ed24..7f9325d31 100755 --- a/tests/cut/cut.pl +++ b/tests/cut/cut.pl @@ -34,7 +34,7 @@ my $from_pos1 = "$prog: byte/character positions are numbered from 1\n$try"; my $inval_fld = "$prog: invalid field range\n$try"; my $inval_pos = "$prog: invalid byte or character range\n$try"; my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try"; -my $nofield = "$prog: an input delimiter may be specified only when " . +my $nofield = "$prog: an input delimiter makes sense\n\tonly when " . "operating on fields\n$try"; my $mutual_dw = "$prog: -d and -w are mutually exclusive\n$try";