commands/key_selection
library
Classes
-
KeySelection
-
Which keys, in which locales, a per-key command should act on.
Functions
-
describeKeyCount(int n)
→ String
-
key / N keys, for a summary line that reads the same either way.
-
previewKeys(Iterable<String> keys, {int limit = 6})
→ String
-
A short, sorted preview of
keys for a summary line.
-
resolveSelection({required DialectProject project, required String command, required List<String> positionals, String? namespace, String? locale, bool all = false})
→ KeySelection
-
Resolve
positionals + namespace + locale into a KeySelection
against project. With all, the selection is every source key instead
(the bulk form for a writer outside Dialect, which has no list to name). Throws SelectionFailure with a ready-to-print message
when the request cannot be honoured.
Exceptions / Errors
-
SelectionFailure
-
A selection that could not be resolved: code is the exit code the command
should return, lines the message to print to stderr.