Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone committed Aug 27, 2020
1 parent 9a66dd8 commit e933eda
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/core/autocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ type FlagSpec struct {
}

func (node *AutoCompleteNode) addGlobalFlags() {
printerType := []string{
PrinterTypeHuman.String(),
PrinterTypeJSON.String(),
PrinterTypeYAML.String(),
PrinterTypeTemplate.String(),
}

node.Children["-D"] = NewAutoCompleteFlagNode(node, &FlagSpec{
Name: "-D",
})
Expand All @@ -72,11 +79,11 @@ func (node *AutoCompleteNode) addGlobalFlags() {
})
node.Children["-o"] = NewAutoCompleteFlagNode(node, &FlagSpec{
Name: "-o",
EnumValues: []string{"json", "human"},
EnumValues: printerType,
})
node.Children["--output"] = NewAutoCompleteFlagNode(node, &FlagSpec{
Name: "--output",
EnumValues: []string{"json", "human"},
EnumValues: printerType,
})
node.Children["-p"] = NewAutoCompleteFlagNode(node, &FlagSpec{
Name: "-p",
Expand Down

0 comments on commit e933eda

Please sign in to comment.