File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
completers/common/gcloud_completer/cmd Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 11package cmd
22
33import (
4+ "os/exec"
5+
46 "github.com/carapace-sh/carapace"
57 "github.com/carapace-sh/carapace-bridge/pkg/actions/bridge"
68 "github.com/spf13/cobra"
@@ -23,14 +25,10 @@ func init() {
2325
2426 carapace .Gen (rootCmd ).PositionalAnyCompletion (
2527 carapace .ActionCallback (func (c carapace.Context ) carapace.Action {
26- // TODO patch user@instance and --flag=optarg as in gcloud completion script
27-
28- if c .Value == "-" {
29- c .Value = "--" // seems shorthand flags aren't completed anyway so expand to longhand first
28+ if _ , err := exec .LookPath ("carapace-gcloud" ); err == nil {
29+ return bridge .ActionCarapace ("carapace-gcloud" )
3030 }
31- c .Setenv ("CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK" , "1" )
32- //lint:ignore SA1019 gcloud uses an old argcomplete version
33- return bridge .ActionArgcompleteV1 ("gcloud" ).Invoke (c ).ToA ()
31+ return bridge .ActionGcloud ("gcloud" )
3432 }),
3533 )
3634}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.23.1
44
55require (
66 github.com/carapace-sh/carapace v1.10.3
7- github.com/carapace-sh/carapace-bridge v1.4.9
7+ github.com/carapace-sh/carapace-bridge v1.4.10
88 github.com/carapace-sh/carapace-selfupdate v0.0.10
99 github.com/carapace-sh/carapace-shlex v1.1.1
1010 github.com/carapace-sh/carapace-spec v1.4.1
Original file line number Diff line number Diff line change 11github.com/carapace-sh/carapace v1.10.3 h1:4L4HpEEZb+I2mtvqKMYed64QR15Tf6+uGDn8BIflObY =
22github.com/carapace-sh/carapace v1.10.3 /go.mod h1:gdyqmVIQJFlcHn4D7BkgyjRU5LlluDXBaiRSdV6GY88 =
3- github.com/carapace-sh/carapace-bridge v1.4.9 h1:f9P1dLcapT7mdBoHMu+SGQrrYiJ7PYkhiz8ZMleote8 =
4- github.com/carapace-sh/carapace-bridge v1.4.9 /go.mod h1:MUOnmTjYoALyl5kDYPrStnA4oDnTcrYc2SL359T4CEY =
3+ github.com/carapace-sh/carapace-bridge v1.4.10 h1:yxLrjxSw9FeedEUounjj+oh6ya/TbSXMsswrFsp0dTU =
4+ github.com/carapace-sh/carapace-bridge v1.4.10 /go.mod h1:cRTSrcdvoaz68yZGd24YhCljaBSUMxCUjB/wTRPqsVI =
55github.com/carapace-sh/carapace-pflag v1.0.0 h1:uJMhl+vwEM/Eb0UdxZUuv4jo4rUAyPijkRGP5gfCuCE =
66github.com/carapace-sh/carapace-pflag v1.0.0 /go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg =
77github.com/carapace-sh/carapace-selfupdate v0.0.10 h1:ZvutqGwVvSj6TmI/tLcort63JD6PaOG0ia6squwbTuo =
You can’t perform that action at this time.
0 commit comments