aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/package_sorter.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-02 11:17:12 +0900
committernsfisis <nsfisis@gmail.com>2026-08-02 11:17:12 +0900
commit876f1bf158cf03944ba56fee351fa97b34fda9e0 (patch)
tree53977084c15ddd585922c58f97dc6c586dabba16 /crates/shirabe/src/util/package_sorter.rs
parentcaf8dee0c73a7a680d93bf943cade43632e74ca7 (diff)
downloadphp-shirabe-876f1bf158cf03944ba56fee351fa97b34fda9e0.tar.gz
php-shirabe-876f1bf158cf03944ba56fee351fa97b34fda9e0.tar.zst
php-shirabe-876f1bf158cf03944ba56fee351fa97b34fda9e0.zip
feat(command): port CompletionTrait's suggestion providers
The seven suggest* methods resolve package names, types, and install preferences for shell completion. PHP returns $this-bound closures; here each method returns a SuggestedValues whose closure receives the bound command as `this` at call time. The blanket impl over every BaseCommand mirrors PHP's per-command `use CompletionTrait;` (the methods are private there, so the wider visibility is observationally equivalent). Notable PHP shapes kept: the hintsToFind counter machine iterates a by-value copy per package (continue 2 -> labelled continue), and suggestAvailablePackage pins an exact vendor match before truncating to $max entries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/package_sorter.rs')
0 files changed, 0 insertions, 0 deletions