From 2b93a1c089ae98f6c415cd08bee4baf26989e5b8 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Mon, 10 Nov 2025 08:41:25 +1000 Subject: [PATCH] chore: update --container flag help that accepts ID prefix --- cmd/uncloud/service/exec.go | 3 ++- website/docs/9-cli-reference/uc_exec.md | 2 +- website/docs/9-cli-reference/uc_service_exec.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/uncloud/service/exec.go b/cmd/uncloud/service/exec.go index 59dcbdf7..95b8c26e 100644 --- a/cmd/uncloud/service/exec.go +++ b/cmd/uncloud/service/exec.go @@ -74,7 +74,8 @@ If the service has multiple replicas and no container ID is specified, the comma // Common flags execCmd.Flags().StringVar(&opts.containerId, "container", "", - "ID of the container to exec into (default is the random container of the service)") + "ID of the container to exec into. Accepts full ID or a unique prefix "+ + "(default is the random container of the service)") // This tells Cobra that all flags must come before positional arguments, so that // commands with their own flags can be handled correctly. diff --git a/website/docs/9-cli-reference/uc_exec.md b/website/docs/9-cli-reference/uc_exec.md index afdeb611..41bae341 100644 --- a/website/docs/9-cli-reference/uc_exec.md +++ b/website/docs/9-cli-reference/uc_exec.md @@ -35,7 +35,7 @@ uc exec [OPTIONS] SERVICE [COMMAND ARGS...] [flags] ## Options ``` - --container string ID of the container to exec into (default is the random container of the service) + --container string ID of the container to exec into. Accepts full ID or a unique prefix (default is the random container of the service) -c, --context string Name of the cluster context. (default is the current context) -d, --detach Detached mode: run command in the background -h, --help help for exec diff --git a/website/docs/9-cli-reference/uc_service_exec.md b/website/docs/9-cli-reference/uc_service_exec.md index 9c8a5616..572970e1 100644 --- a/website/docs/9-cli-reference/uc_service_exec.md +++ b/website/docs/9-cli-reference/uc_service_exec.md @@ -35,7 +35,7 @@ uc service exec [OPTIONS] SERVICE [COMMAND ARGS...] [flags] ## Options ``` - --container string ID of the container to exec into (default is the random container of the service) + --container string ID of the container to exec into. Accepts full ID or a unique prefix (default is the random container of the service) -c, --context string Name of the cluster context. (default is the current context) -d, --detach Detached mode: run command in the background -h, --help help for exec