Repository navigation
Allow for argument completion - #309
Conversation
This shows for a single command on how to complete service names in the cluster: `uc inspect <TAB>` will complete using ListServices See: psviderski#307 Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
|
Just before I look into the code, service listing is quite an expensive operation (not optimised) which can take a second or several seconds for setups with a dozens of containers and when the machines are located far from the client (additional latency). How does this feel in practice? |
If tested it with a cluster with one server and 1 service. Machine itself is US (i'm EU), this worked fine. And my shell (zsh) tells me it's completing and I can interrupt it.
Yes, at least that's what is happening, because I see no output what so ever during the completion. I'll try to find some time to test this somewhat more intensive |
This shows for a single command on how to complete service names in the cluster: `uc inspect <TAB>` will complete using ListServices See: psviderski#307 Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
88d5e2b to
325c435
Compare
Screencast.From.2026-04-22.09-47-45.mp4 |
psviderski
left a comment
There was a problem hiding this comment.
Looks great!
What do you think of moving the internal/completion package to internal/cli/completion as this is scoped to CLI only?
…miek/26/apr10vr/comp
Signed-off-by: Miek Gieben <[email protected]>
Signed-off-by: Miek Gieben <[email protected]>
|
moved the import path |
Signed-off-by: Miek Gieben <[email protected]>
This adds completion for cluster interaction for Volumes, Services and Machines. It further uses the machine completion for the -m flag in all commands that have one.
Specifically excluded are local completion for the config file or compose file, ieuc buildoruc deploy, but this can be easily added if we wish.uc ctx use ...added too.uc deploy/buildcompose service completion added tooSee: #307