Commit 87cfc33b authored by Di Xu's avatar Di Xu

bump spf13/cobra(c439c4): Terminate the stripping of flags when -- is found

parent ebae09e7
......@@ -2582,13 +2582,13 @@
},
{
"ImportPath": "github.com/spf13/cobra",
"Comment": "v0.0.1-32-g6644d46",
"Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab"
"Comment": "v0.0.1-34-gc439c4f",
"Rev": "c439c4fa093711d42e1b01acb1235b52004753c1"
},
{
"ImportPath": "github.com/spf13/cobra/doc",
"Comment": "v0.0.1-32-g6644d46",
"Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab"
"Comment": "v0.0.1-34-gc439c4f",
"Rev": "c439c4fa093711d42e1b01acb1235b52004753c1"
},
{
"ImportPath": "github.com/spf13/jwalterweatherman",
......
......@@ -584,7 +584,7 @@
},
{
"ImportPath": "github.com/spf13/cobra",
"Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab"
"Rev": "c439c4fa093711d42e1b01acb1235b52004753c1"
},
{
"ImportPath": "github.com/spf13/pflag",
......
......@@ -268,7 +268,7 @@
},
{
"ImportPath": "github.com/spf13/cobra",
"Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab"
"Rev": "c439c4fa093711d42e1b01acb1235b52004753c1"
},
{
"ImportPath": "github.com/spf13/pflag",
......
......@@ -252,7 +252,7 @@
},
{
"ImportPath": "github.com/spf13/cobra",
"Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab"
"Rev": "c439c4fa093711d42e1b01acb1235b52004753c1"
},
{
"ImportPath": "github.com/spf13/pflag",
......
......@@ -6,15 +6,16 @@ Generating bash completions from a cobra command is incredibly easy. An actual p
package main
import (
"io/ioutil"
"os"
"io/ioutil"
"os"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd"
"k8s.io/kubernetes/pkg/kubectl/cmd"
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
)
func main() {
kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl.GenBashCompletionFile("out.sh")
kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
kubectl.GenBashCompletionFile("out.sh")
}
```
......
......@@ -475,6 +475,9 @@ Loop:
s := args[0]
args = args[1:]
switch {
case s == "--":
// "--" terminates the flags
break Loop
case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags):
// If '--flag arg' then
// delete arg from args.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment