Merge pull request #7245 from dotCooCoo/fix/not-files-real-params

Plug-ins: file-key exemptions name only params a command takes
This commit is contained in:
BFlat
2026-11-14 03:24:13 +07:00
committed by GitHub
4 changed files with 128 additions and 30 deletions
+7
View File
@@ -172,6 +172,13 @@ fn accepted(doc: &'static str, depth: usize) -> Option<Vec<&'static str>> {
Some(keys)
}
/// Every key the description `doc` takes, those of the commands its `…` entries name included, or
/// `None` when that isn't known: it doesn't parse, a `…` entry names no command, or one names a
/// command in [`UNCHECKED`].
pub(crate) fn accepted_keys(doc: &'static str) -> Option<Vec<&'static str>> {
accepted(doc, 0)
}
/// Does the description `doc` name `key` as a parameter (its own keys, and those of the commands
/// its `…` entries name)?
pub(crate) fn takes_key(doc: &'static str, key: &str) -> bool {