Skip to content

Commit

Permalink
Merge pull request #1532 from rsteube/git-push-forcewithlease
Browse files Browse the repository at this point in the history
git: push - force-with-lease
  • Loading branch information
rsteube authored Mar 4, 2023
2 parents 9d9356e + 51c5ebe commit 42cec74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions completers/git_completer/cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ func init() {
pushCmd.Flag("force-with-lease").NoOptDefVal = " "

carapace.Gen(pushCmd).FlagCompletion(carapace.ActionMap{
"force-with-lease": carapace.ActionMultiParts(":", func(c carapace.Context) carapace.Action {
switch len(c.Parts) {
case 0, 1:
return git.ActionRefs(git.RefOption{}.Default())
default:
return carapace.ActionValues()
}
}),
"signed": carapace.ActionValues("yes", "no", "if-asked"),
})

Expand Down

0 comments on commit 42cec74

Please sign in to comment.