Skip to content

Commit 0c06a34

Browse files
committed
bug #33 exclude the completion install command from completions (tucksaun)
This PR was merged into the main branch. Discussion ---------- exclude the completion install command from completions Having the `completion` and `self:completion` commands in the autocompletion does not really make sense (because you need to have run it before to have the autocompletion working). Commits ------- fc6d708 exclude the completion install command from completions
2 parents 3261143 + fc6d708 commit 0c06a34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

completion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ func AutocompleteAppAction(c *Context) error {
6363

6464
// transpose registered commands and flags to posener/complete equivalence
6565
for _, command := range c.App.Commands {
66+
// skip the completion commands itself
67+
if command == shellAutoCompleteInstallCommand {
68+
continue
69+
}
6670
subCmd := command.convertToPosenerCompleteCommand(c)
6771

6872
if command.Hidden == nil || !command.Hidden() {

0 commit comments

Comments
 (0)