Skip to content

Commit

Permalink
Merge pull request #1454 from montag451/fix-profile-copy-comp
Browse files Browse the repository at this point in the history
incus: Fix completion for `profile copy`
  • Loading branch information
stgraber authored Dec 3, 2024
2 parents 4441e6c + 28da5da commit 7fb0785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/incus/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ func (c *cmdProfileCopy) Command() *cobra.Command {

cmd.ValidArgsFunction = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) == 0 {
return c.global.cmpInstances(toComplete)
return c.global.cmpProfiles(toComplete, true)
}

if len(args) == 1 {
return c.global.cmpRemotes(toComplete, false)
return c.global.cmpProfiles(toComplete, true)
}

return nil, cobra.ShellCompDirectiveNoFileComp
Expand Down

0 comments on commit 7fb0785

Please sign in to comment.