Skip to content

Commit

Permalink
added issue delete completion
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 28, 2021
1 parent 2e8b0cc commit 413dd7f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/cmd/issue/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ package delete

import (
"fmt"
"net/http"
"strconv"

"github.com/AlecAivazis/survey/v2"
"github.com/cli/cli/api"
"github.com/cli/cli/internal/config"
"github.com/cli/cli/internal/ghrepo"
"github.com/cli/cli/pkg/cmd/issue/shared"
"github.com/cli/cli/pkg/cmdutil"
"github.com/cli/cli/pkg/cmdutil/action"
"github.com/cli/cli/pkg/iostreams"
"github.com/cli/cli/pkg/prompt"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"net/http"
"strconv"
)

type DeleteOptions struct {
Expand Down Expand Up @@ -50,6 +53,12 @@ func NewCmdDelete(f *cmdutil.Factory, runF func(*DeleteOptions) error) *cobra.Co
},
}

cmdutil.DeferCompletion(func() {
carapace.Gen(cmd).PositionalCompletion(
action.ActionIssues(cmd, action.IssueOpts{Open: true, Closed: true}),
)
})

return cmd
}

Expand Down

0 comments on commit 413dd7f

Please sign in to comment.