Skip to content

Commit

Permalink
go: added asmflags and gcflags completion
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jul 26, 2023
1 parent cdfcfb1 commit 0591bb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions completers/go-tool-compile_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/tools/golang"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -93,6 +94,7 @@ func init() {
"coveragecfg": carapace.ActionFiles(),
"cpuprofile": carapace.ActionFiles(),
"embedcfg": carapace.ActionFiles(),
"goversion": golang.ActionVersions(),
"linkobj": carapace.ActionFiles(),
"memprofile": carapace.ActionFiles(),
"mutexprofile": carapace.ActionFiles(),
Expand Down
2 changes: 2 additions & 0 deletions completers/go_completer/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ func addBuildFlags(cmd *cobra.Command) {

carapace.Gen(cmd).FlagCompletion(carapace.ActionMap{
"C": carapace.ActionDirectories(),
"asmflags": bridge.ActionCarapaceBin("go", "tool", "asm").Split(),
"buildmode": golang.ActionBuildmodes(),
"buildvcs": carapace.ActionValues("true", "false", "auto").StyleF(style.ForKeyword),
"compiler": carapace.ActionValues("gccgo", "gc"),
"coverpkg": golang.ActionPackages().UniqueList(","),
"gcflags": bridge.ActionCarapaceBin("go", "tool", "compile").Split(),
"ldflags": bridge.ActionCarapaceBin("go", "tool", "link").Split(),
"mod": carapace.ActionValues("readonly", "vendor", "mod"),
"modfile": carapace.ActionFiles(".mod"),
Expand Down

0 comments on commit 0591bb4

Please sign in to comment.