← Commit list

ee8b94acb

Denys Vlasenko
Denys Vlasenko
2024-12-16
SUCCESS Duration: 156s

Subject

cut: shorten error messages on bad syntax

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/cut.c+3 -3
@@ -330,15 +330,15 @@ int cut_main(int argc UNUSED_PARAM, char **argv)
/* non-field (char or byte) cutting has some special handling */
if (!(opt & (OPT_FIELDS|OPT_REGEX))) {
- static const char _op_on_field[] ALIGN1 = " only when operating on fields";
+ static const char _op_on_field[] ALIGN1 = " makes sense only with -f"IF_FEATURE_CUT_REGEX(" or -F");
if (opt & OPT_SUPPRESS) {
bb_error_msg_and_die
- ("suppressing non-delimited lines makes sense%s", _op_on_field);
+ ("-s%s", _op_on_field);
}
if (opt & OPT_DELIM) {
bb_error_msg_and_die
- ("a delimiter may be specified%s", _op_on_field);
+ ("-d DELIM%s", _op_on_field);
}
}