Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 703a296

Browse files
gfyragDavid Ragot
authored andcommitted
feat: expose GetCompletions (was getCompletions)
1 parent bd914e5 commit 703a296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

completions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (c *Command) initCompleteCmd(args []string) {
205205
Long: fmt.Sprintf("%[2]s is a special command that is used by the shell completion logic\n%[1]s",
206206
"to request completion choices for the specified command-line.", ShellCompRequestCmd),
207207
Run: func(cmd *Command, args []string) {
208-
finalCmd, completions, directive, err := cmd.getCompletions(args)
208+
finalCmd, completions, directive, err := cmd.GetCompletions(args)
209209
if err != nil {
210210
CompErrorln(err.Error())
211211
// Keep going for multiple reasons:
@@ -270,7 +270,7 @@ func (c *Command) initCompleteCmd(args []string) {
270270
}
271271
}
272272

273-
func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDirective, error) {
273+
func (c *Command) GetCompletions(args []string) (*Command, []string, ShellCompDirective, error) {
274274
// The last argument, which is not completely typed by the user,
275275
// should not be part of the list of arguments
276276
toComplete := args[len(args)-1]

0 commit comments

Comments
 (0)