diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-06-21 16:57:49 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-06-21 17:17:06 +0200 |
commit | 050693b2e773e6334dc200fc0c819e3829ac400d (patch) | |
tree | 97a1614b3f622023c5282141157ebdb36d9e7678 /vendor/github.com/spf13/cobra/fish_completions.go | |
parent | c8032b99117068018d21f3e1773cdb070fa46279 (diff) | |
download | podman-050693b2e773e6334dc200fc0c819e3829ac400d.tar.gz podman-050693b2e773e6334dc200fc0c819e3829ac400d.tar.bz2 podman-050693b2e773e6334dc200fc0c819e3829ac400d.zip |
bump github.com/spf13/cobra from 1.4.0 to 1.5.0
Update cobra to latest version. Remove workaround for podman -h.
Also regenerate the completion scripts.
[NO NEW TESTS NEEDED]
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/github.com/spf13/cobra/fish_completions.go')
-rw-r--r-- | vendor/github.com/spf13/cobra/fish_completions.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go index bb57fd568..005ee6be7 100644 --- a/vendor/github.com/spf13/cobra/fish_completions.go +++ b/vendor/github.com/spf13/cobra/fish_completions.go @@ -11,8 +11,8 @@ import ( func genFishComp(buf io.StringWriter, name string, includeDesc bool) { // Variables should not contain a '-' or ':' character nameForVar := name - nameForVar = strings.Replace(nameForVar, "-", "_", -1) - nameForVar = strings.Replace(nameForVar, ":", "_", -1) + nameForVar = strings.ReplaceAll(nameForVar, "-", "_") + nameForVar = strings.ReplaceAll(nameForVar, ":", "_") compCmd := ShellCompRequestCmd if !includeDesc { @@ -38,7 +38,8 @@ function __%[1]s_perform_completion __%[1]s_debug "args: $args" __%[1]s_debug "last arg: $lastArg" - set -l requestComp "$args[1] %[3]s $args[2..-1] $lastArg" + # Disable ActiveHelp which is not supported for fish shell + set -l requestComp "%[9]s=0 $args[1] %[3]s $args[2..-1] $lastArg" __%[1]s_debug "Calling $requestComp" set -l results (eval $requestComp 2> /dev/null) @@ -196,7 +197,7 @@ complete -c %[2]s -n '__%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' `, nameForVar, name, compCmd, ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, - ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs)) + ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name))) } // GenFishCompletion generates fish completion file and writes to the passed writer. |