Skip to content

Commit

Permalink
feat: Rework fig autocomplete command
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
  • Loading branch information
Engin Diri committed Aug 20, 2022
1 parent 8f29f03 commit 6c4f607
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 30 deletions.
2 changes: 2 additions & 0 deletions cmd/cosign/cli/commands.go
Expand Up @@ -26,6 +26,7 @@ import (

cranecmd "github.com/google/go-containerregistry/cmd/crane/cmd"
"github.com/sigstore/cosign/cmd/cosign/cli/options"
cobracompletefig "github.com/withfig/autocomplete-tools/integrations/cobra"
)

var (
Expand Down Expand Up @@ -118,6 +119,7 @@ func New() *cobra.Command {
cmd.AddCommand(cranecmd.NewCmdAuthLogin("cosign"))

cmd.SetGlobalNormalizationFunc(normalizeCertificateFlags)
cmd.AddCommand(cobracompletefig.CreateCompletionSpecCommand())

return cmd
}
27 changes: 0 additions & 27 deletions cmd/fig/fig.go

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -33,7 +33,7 @@ require (
github.com/stretchr/testify v1.8.0
github.com/theupdateframework/go-tuf v0.3.1
github.com/transparency-dev/merkle v0.0.1
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1
github.com/xanzy/go-gitlab v0.72.0
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -1977,8 +1977,8 @@ github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvC
github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898 h1:2Z+iziYPiyWk5hVJ3EYLn/i33Tj5ukytaJA0Th9tbgc=
github.com/withfig/autocomplete-tools/packages/cobra v0.0.0-20220122124547-31d3821a6898/go.mod h1:cKObXQ6PVFO7bHUd5jpApXvMIt55Ewz7UdMiC05ONxI=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 h1:+dBg5k7nuTE38VVdoroRsT0Z88fmvdYrI2EjzJst35I=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1/go.mod h1:nmuySobZb4kFgFy6BptpXp/BBw+xFSyvVPP6auoJB4k=
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=
github.com/xanzy/go-gitlab v0.72.0 h1:/9BQTftUE7GRK/RO1eeWxG1cOE+tjwBrvRdpkeSOq6w=
github.com/xanzy/go-gitlab v0.72.0/go.mod h1:d/a0vswScO7Agg1CZNz15Ic6SSvBG9vfw8egL99t4kA=
Expand Down

0 comments on commit 6c4f607

Please sign in to comment.