diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-07-02 13:03:10 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-07-02 13:03:10 +0200 |
commit | 735be12481cdc3edfcbca3500172d2164255e1a3 (patch) | |
tree | 67f0ee2916812072967707ae6de779ebbcdb0476 /vendor/github.com/spf13/cobra/bash_completions.go | |
parent | 7eb9ed975899ffe12fb82066aebf652444205e02 (diff) | |
download | podman-735be12481cdc3edfcbca3500172d2164255e1a3.tar.gz podman-735be12481cdc3edfcbca3500172d2164255e1a3.tar.bz2 podman-735be12481cdc3edfcbca3500172d2164255e1a3.zip |
force github.com/spf13/cobra@v1.1.3
v1.2.0 is breaking CI (see containers/podman/pull/10844).
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/spf13/cobra/bash_completions.go')
-rw-r--r-- | vendor/github.com/spf13/cobra/bash_completions.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index 925e6e787..710614793 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -384,7 +384,7 @@ func writePostscript(buf io.StringWriter, name string) { name = strings.Replace(name, ":", "__", -1) WriteStringAndCheck(buf, fmt.Sprintf("__start_%s()\n", name)) WriteStringAndCheck(buf, fmt.Sprintf(`{ - local cur prev words cword split + local cur prev words cword declare -A flaghash 2>/dev/null || : declare -A aliashash 2>/dev/null || : if declare -F _init_completion >/dev/null 2>&1; then @@ -400,13 +400,11 @@ func writePostscript(buf io.StringWriter, name string) { local flags_with_completion=() local flags_completion=() local commands=("%[1]s") - local command_aliases=() local must_have_one_flag=() local must_have_one_noun=() local has_completion_function local last_command local nouns=() - local noun_aliases=() __%[1]s_handle_word } @@ -512,7 +510,7 @@ func writeLocalNonPersistentFlag(buf io.StringWriter, flag *pflag.Flag) { // Setup annotations for go completions for registered flags func prepareCustomAnnotationsForFlags(cmd *Command) { - for flag := range cmd.Root().flagCompletionFunctions { + for flag := range flagCompletionFunctions { // Make sure the completion script calls the __*_go_custom_completion function for // every registered flag. We need to do this here (and not when the flag was registered // for completion) so that we can know the root command name for the prefix |