Skip to content

Commit

Permalink
Support --output=json style options
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Feb 25, 2019
1 parent 98e1c29 commit 2276d16
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kube/completer.go
Expand Up @@ -180,8 +180,13 @@ func excludeOptions(args []string) ([]string, bool) {
}

for _, s := range shouldSkipNext {
if s == args[i] {
skipNextArg = true
if strings.HasPrefix(args[i], s) {
if strings.Contains(args[i], "=") {
// we can specify option value like '-o=json'
skipNextArg = false
} else {
skipNextArg = true
}
continue
}
}
Expand Down

0 comments on commit 2276d16

Please sign in to comment.