Skip to content

Commit

Permalink
Don't generate fish completion for hidden commands
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Sep 11, 2019
1 parent b207e20 commit 759c525
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func (a *App) prepareFishCommands(commands []Command, allCommands *[]string, pre
for i := range commands {
command := &commands[i]

if command.Hidden {
continue
}

var completion strings.Builder
completion.WriteString(fmt.Sprintf(
"complete -r -c %s -n '%s' -a '%s'",
Expand Down

0 comments on commit 759c525

Please sign in to comment.