summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2019-08-29 00:54:51 +0200
committerBernhard Voelker <mail@bernhard-voelker.de>2019-08-29 21:10:57 +0200
commit333ce56380dfd30115e1a5326a87414a5bba607e (patch)
tree902bdb1ba9a1f393f82a18fee31dc8beadaaf6ca
parent278e8fbb1251df82c424a8320fe24d1cc93699ba (diff)
downloadfindutils-333ce56380.tar.gz
find: improve warning when global option is specified after other argument
Global options like -maxdepth should be specified before other arguments like tests, operators, etc. The corresponding warning diagnostic was obviously misleading, so that at least the French and the German translations - and maybe even the English original - were not well understood by users. * find/parser.c (found_parser): Improve diagnostic, thus hopefully also avoiding translation issues. Remove extra newline. Fixes https://sv.gnu.org/bugs/?56820
-rw-r--r--NEWS4
-rw-r--r--find/parser.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 5833e70..2faa536 100644
--- a/NEWS
+++ b/NEWS
@@ -70,6 +70,10 @@ Some minor documentation improvements are listed in "Bug Fixes" below.
** Bug Fixes
+#56820: find: improve diagnostic when a global option like -maxdepth is
+ specified after another argument like a test, thus hopefully avoiding
+ translation issues (at least French, German).
+
#56142: doc: fix bug #56142 by specifying which actions inhibit the
default -print.
diff --git a/find/parser.c b/find/parser.c
index a3b9e76..5770487 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -606,12 +606,11 @@ found_parser (const char *original_arg, const struct parser_table *entry)
{
/* option which follows a non-option */
error (0, 0,
- _("warning: you have specified the %s "
- "option after a non-option argument %s, "
- "but options are not positional (%s affects "
- "tests specified before it as well as those "
- "specified after it). Please specify options "
- "before other arguments.\n"),
+ _("warning: you have specified the global option %s "
+ "after the argument %s, but global options are not "
+ "positional, i.e., %s affects tests specified before it "
+ "as well as those specified after it. "
+ "Please specify global options before other arguments."),
original_arg,
first_nonoption_arg,
original_arg);