Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Nov 14, 2023
1 parent 1de38da commit a19e972
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func registerFlagCompletion(cmd *cobra.Command) {
if !storage.hasFlag(cmd, f.Name) {
return // skip if not defined in carapace
}
if _, ok := cmd.GetFlagCompletionByName(f.Name); ok {
if _, ok := cmd.GetFlagCompletionFunc(f.Name); ok {
return // skip if already defined in cobra
}

Expand Down
2 changes: 1 addition & 1 deletion storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (s _storage) getFlag(cmd *cobra.Command, name string) Action {

flagAction, ok := entry.flag[name]
if !ok {
if f, ok := cmd.GetFlagCompletionByName(name); ok {
if f, ok := cmd.GetFlagCompletionFunc(name); ok {
flagAction = ActionCobra(f)
}
}
Expand Down
2 changes: 1 addition & 1 deletion traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func traverse(cmd *cobra.Command, args []string) (Action, Context) {
fs := pflagfork.FlagSet{FlagSet: cmd.Flags()}

context := NewContext(args...)
context.cmd = c
context.cmd = cmd
loop:
for i, arg := range context.Args {
switch {
Expand Down

0 comments on commit a19e972

Please sign in to comment.