diff options
| author | Bernhard Voelker <mail@bernhard-voelker.de> | 2019-08-29 00:54:51 +0200 |
|---|---|---|
| committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2019-08-29 21:10:57 +0200 |
| commit | 333ce56380dfd30115e1a5326a87414a5bba607e (patch) | |
| tree | 902bdb1ba9a1f393f82a18fee31dc8beadaaf6ca | |
| parent | 278e8fbb1251df82c424a8320fe24d1cc93699ba (diff) | |
| download | findutils-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-- | NEWS | 4 | ||||
| -rw-r--r-- | find/parser.c | 11 |
2 files changed, 9 insertions, 6 deletions
@@ -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); |
