skate
skate copied to clipboard
feat: add autocompletion for keys and databases
Describe your changes
[!NOTE] Feel free to accept, disregard, or close (my feeling won't be hurt)
- This pull request introduces autocompletion. The
getanddeletecommands now support key autocompletion across all databases, suggesting key names in the formatkey@dbwith prefix matching - The
listanddelete-dbcommands support database name autocompletion, returning entries like@defaultor@prodas the user types - The key completion logic uses a prefix scan with Badger’s iterator API, returning up to 200 suggestions to keep performance fast and predictable. Database names are fetched using the existing
getDbs()function with optional prefix filtering
Usage
- These completions are enabled automatically when users add
eval "$(skate completion zsh)"(or the Bash/Fish equivalent) to their shell config
Related issue/discussion: https://github.com/charmbracelet/skate/issues/145
Checklist before requesting a review
- [X] I have read
CONTRIBUTING.md - [X] I have performed a self-review of my code
If this is a feature
- [x] I have created a discussion
- [ ] A project maintainer has approved this feature request. Link to comment:
References
If I can assist with pull request review in any way, feel free to ping me