diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-06-05 15:58:05 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-06-05 15:58:05 +0800 |
| commit | 2f0d8531d72514be893880430a370470bbe50aeb (patch) | |
| tree | 74c0b9133d3b4720ca2064a3f9ca5b68437fa0db | |
| parent | f34033cc90b3b9ec1cf549419b1f2d3fc6318a58 (diff) | |
Exclude all hidden nodes from completion filtering
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | mingling_core/src/comp.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a888cc2..55dbfce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ 1. **\[core:flag\]** Refactored the `special_argument!` and `special_arguments!` macros to replace index‑based `while` loops with iterator `position` and `drain`, improving both performance and readability. +2. **\[core:comp\]** Changed the completion system's node filtering to exclude all hidden nodes (names starting with `_`) instead of only the specific `__comp` node. This makes the completion script generation more general — any node prefixed with an underscore is now treated as internal/hidden and excluded from suggestions. + #### Features: 1. **\[core\]** Added the `unpack_chain_process!` macro for ergonomically extracting the inner value from a `ChainProcess` result. diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs index 4f3890a..1769a5c 100644 --- a/mingling_core/src/comp.rs +++ b/mingling_core/src/comp.rs @@ -155,7 +155,7 @@ where let cmd_nodes: Vec<String> = this::<P>() .get_nodes() .into_iter() - .filter(|(s, _)| s != "__comp") + .filter(|(s, _)| !s.starts_with('_')) .map(|(s, _)| s) .collect(); debug!("cmd_nodes: {:?}", cmd_nodes); |
