Add support for local cache in the CLI
Nobody has claimed this yet.
- #1318 by @remyleone — closed without merging
Assessment
This issue has not been assessed yet.
Description
As a CLI user, I want to autocomplete on the UUIDs, because I'm lazy to write/paste a UUID.
Expected behavior:
$ scw in
*tab tab*
$ scw instance
$ scw instance g
*tab tab*
$ scw instance get
$ scw instance get ser
*tab tab*
$ scw instance get server
*tab tab*
$ scw instance get server server-id=
$ scw instance get server server-id=a
*tab tab*
$ scw instance get server server-id=a863f248-dd4e-4445-ba66-afacbdcfac8d
*run*
Idea:
Having aAutoCompleteFunc and a ResolverFunc.
When trying to auto-complete a UUID field we should suggest a UUID or complete if only one match. In order to achieve this quickly, we should list the server IDs once and cache it somewhere. This catch must be updated on any create, update, list, or delete or after a cache TTL interval.
It also needs to not impact too much reactivity on auto-complete (avoiding unnecessary disk access on every completion).
This feature also needs to take into account the profile specified with the -p flag. We will get different resources with different profiles.
scw --debug autocomplete complete zsh -- 5 scw baremetal server get
- Dominant language
- Go
- Stars
- 997
- Forks
- 172
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 107
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scaleway/scaleway-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
scaleway/scaleway-cli#6153 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
scaleway/scaleway-cli#6113 ·
-
enhancement
scaleway/scaleway-cli#6172 · 1 comment · 2 reactions · 1 assignee ·
-
documentation enhancement
scaleway/scaleway-cli#6168 · 1 assignee ·
-
enhancement
scaleway/scaleway-cli#6167 · 1 assignee ·
All issues in scaleway/scaleway-cli
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100