Fix auto-completion logic for APIs that end with 'y' - #194
Conversation
|
✅ Build complete for PR #194. 📦 Binary artifacts are available in the workflow run (expires on August 31, 2026).
|
|
would it be feasible to add a configurable lookup list, all examples cought in generic rule may be ambitious. I may one day decide we need status/statae… or worse, some dutch plural. |
|
@DaanHoogland currently we use plain, regular English nouns for CloudStack API resources, and there are no cases today where an irregular plural would arise. Since there's no concrete requirement for it yet, I don't think a configurable lookup list is needed here. We can probably address that when the need arises. |
There was a problem hiding this comment.
Pull request overview
This pull request improves CLI auto-completion API selection by introducing a small pluralization helper and using it in the autocomplete heuristics so that APIs whose nouns end in y/ies are mapped correctly to their corresponding list* APIs.
Changes:
- Add
pluralizeNounhelper to apply basic English pluralization rules (includingy -> ies). - Use
pluralizeNounfor deriving the related noun infindAutocompleteAPIinstead of naïvely appendings/es.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
With this fix, autocompletion works for APIs ending in 'y' or 'ies' e.g. deleteSnapshotPolicies , deleteAutoscalePolicy