summaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/cobra/shell_completions.md
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-12-15 15:18:02 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-12-16 15:28:39 +0100
commit03a3fc37fe82800113a1c9043448acb2afa539a6 (patch)
tree216aae69ad45e33c18bd5af8eb37d8a16dae4050 /vendor/github.com/spf13/cobra/shell_completions.md
parentd1c91c128ea32dae3e9c56c657ea57dfed9f6ad4 (diff)
downloadpodman-03a3fc37fe82800113a1c9043448acb2afa539a6.tar.gz
podman-03a3fc37fe82800113a1c9043448acb2afa539a6.tar.bz2
podman-03a3fc37fe82800113a1c9043448acb2afa539a6.zip
bump cobra to 1.3.0
This contains some fixes for the shell completion files. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/github.com/spf13/cobra/shell_completions.md')
-rw-r--r--vendor/github.com/spf13/cobra/shell_completions.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/github.com/spf13/cobra/shell_completions.md b/vendor/github.com/spf13/cobra/shell_completions.md
index 4ba06a11c..03add869b 100644
--- a/vendor/github.com/spf13/cobra/shell_completions.md
+++ b/vendor/github.com/spf13/cobra/shell_completions.md
@@ -28,17 +28,17 @@ and then modifying the generated `cmd/completion.go` file to look something like
var completionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
- Long: `To load completions:
+ Long: fmt.Sprintf(`To load completions:
Bash:
- $ source <(yourprogram completion bash)
+ $ source <(%[1]s completion bash)
# To load completions for each session, execute once:
# Linux:
- $ yourprogram completion bash > /etc/bash_completion.d/yourprogram
+ $ %[1]s completion bash > /etc/bash_completion.d/%[1]s
# macOS:
- $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram
+ $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s
Zsh:
@@ -48,25 +48,25 @@ Zsh:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
- $ yourprogram completion zsh > "${fpath[1]}/_yourprogram"
+ $ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
# You will need to start a new shell for this setup to take effect.
fish:
- $ yourprogram completion fish | source
+ $ %[1]s completion fish | source
# To load completions for each session, execute once:
- $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish
+ $ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
PowerShell:
- PS> yourprogram completion powershell | Out-String | Invoke-Expression
+ PS> %[1]s completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
- PS> yourprogram completion powershell > yourprogram.ps1
+ PS> %[1]s completion powershell > %[1]s.ps1
# and source this file from your PowerShell profile.
-`,
+`,cmd.Root().Name()),
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),