diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-25 17:17:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 17:17:36 +0000 |
commit | a1045adbf4294d5afb27533eeeb99c4079baa846 (patch) | |
tree | e752547252334d6c184cf5fcbec74834f2d64e55 /vendor/github.com/spf13/cobra/command.go | |
parent | b9d77796c0e011e6337f5c173bb633ebcae863f9 (diff) | |
parent | 017f8d6a632d26757685a5e629e3263db14b5156 (diff) | |
download | podman-a1045adbf4294d5afb27533eeeb99c4079baa846.tar.gz podman-a1045adbf4294d5afb27533eeeb99c4079baa846.tar.bz2 podman-a1045adbf4294d5afb27533eeeb99c4079baa846.zip |
Merge pull request #7777 from containers/dependabot/go_modules/github.com/containers/common-0.23.0
Bump github.com/containers/common from 0.22.0 to 0.23.0
Diffstat (limited to 'vendor/github.com/spf13/cobra/command.go')
-rw-r--r-- | vendor/github.com/spf13/cobra/command.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index fdac9d272..88e6ed77d 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -57,6 +57,10 @@ type Command struct { // ValidArgs is list of all valid non-flag arguments that are accepted in bash completions ValidArgs []string + // ValidArgsFunction is an optional function that provides valid non-flag arguments for bash completion. + // It is a dynamic version of using ValidArgs. + // Only one of ValidArgs and ValidArgsFunction can be used for a command. + ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) // Expected arguments Args PositionalArgs @@ -911,6 +915,9 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { args = os.Args[1:] } + // initialize the hidden command to be used for bash completion + c.initCompleteCmd(args) + var flags []string if c.TraverseChildren { cmd, flags, err = c.Traverse(args) |