cut: adjust error message to be less specific

* src/cut.c (main): Cater for both misplaced -w and -d.
This commit is contained in:
Pádraig Brady committed 2026-04-05 13:15:56 +01:00
1 parent 19aa72b4ea
commit 74047ec55e
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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\
+1 -1
View File
@@ -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";