aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-02 12:11:47 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-02 12:11:47 +0800
commit43fadfa22b1f28382338c892d91a6c388b5e540c (patch)
treefb986e1d4fa65801a8ced895e43c135921328cad /CHANGELOG.md
parent0f9ca0745e3e80c751404f45cb2b97d4d14c97d3 (diff)
feat(core): add batch methods to Suggest and update macro
Add `add_suggest()` and `add_suggest_with_description()` methods to `Suggest` for ergonomic batch population of suggestion sets from collections of strings. Update the `suggest!` macro to use these new methods and accept expressions beyond string literals for suggestion items.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d46f4d..4780d0f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -72,6 +72,13 @@ None
_No behavioral change for downstream code — all public items are re-exported with the same names. The `__this_program_impl` module is `#[doc(hidden)]` and not part of the public API._
+3. **[`core:comp`]** Added `add_suggest()` and `add_suggest_with_description()` methods to `Suggest` for batch-adding suggestion items:
+
+ - **`add_suggest(&mut self, items: impl Into<Vec<String>>)`** — Wraps each item in `SuggestItem::Simple` and inserts it into the underlying `BTreeSet`.
+ - **`add_suggest_with_description(&mut self, items: impl Into<Vec<String>>, desc: impl Into<String>)`** — Wraps each item in `SuggestItem::WithDescription` using the provided description and inserts it into the set.
+
+ These methods enable ergonomic batch population of suggestion sets from collections of strings, complementing the existing `insert()` method.
+
#### Features:
1. **[`picker:value:paths`]** Added new path wrapper types to `arg_picker::value` for filesystem-aware argument parsing: