If I run, for example, `locale -k nonexistant`, I get a helpful error message: `Unknown keyword: 'nonexistant'`.
However, `locale` in this case still exits with an exit code of 0. It should probably exit with nonzero instead to indicate the failure in finding the keyword.
An identical bug also exists in NetBSD. See https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54692
Created attachment 215500 [details]
proposed patch for locale
Providing patch where locale returns with error in case of invalid keyword/category.
A commit references this bug:
Date: Sat Jun 13 08:37:25 UTC 2020
New revision: 362146
locale: exit 1 if unknown keyword was specified
Submitted by: Akos Somfai <email@example.com>
Committed, thank you!