alexellis / arkade

Open Source Marketplace For Developer Tools
https://blog.alexellis.io/kubernetes-marketplace-two-year-update/
MIT License
4.24k stars 287 forks source link

bug: fish and powershell autocompletion support missing in the description of the autocompletion command #540

Open developer-guy opened 3 years ago

developer-guy commented 3 years ago

Expected Behaviour

Add these to the description of the autocompletion command:

👉 https://github.com/alexellis/arkade/blob/1e43d6ead0ef958e9caf08e0ec23b49fe6563ffb/cmd/completion.go#L60-L63

Current Behaviour

arkade completion --help                                                                                                                          ─╯

Outputs shell completion for the given shell (bash or zsh)
This depends on the bash-completion binary.  Example installation instructions:
OS X:
    $ brew install bash-completion
    $ source $(brew --prefix)/etc/bash_completion
    $ arkade completion bash > ~/.arkade-completion  # for bash users
    $ arkade completion zsh > ~/.arkade-completion   # for zsh users
    $ source ~/.arkade-completion
Ubuntu:
    $ apt-get install bash-completion
    $ source /etc/bash-completion
    $ source <(arkade completion bash) # for bash users
    $ source <(arkade completion zsh)  # for zsh users
Additionally, you may want to output the completion to a file and source in your .bashrc

Are you a GitHub Sponsor (Yes/No?)

Check at https://github.com/sponsors/alexellis

Possible Solution

add this description above to the description of the autocompletion command:

fish:

  $ arkade completion fish | source

  # To load completions for each session, execute once:
  $ arkade completion fish > ~/.config/fish/completions/arkade.fish

PowerShell:

  PS> arkade completion powershell | Out-String | Invoke-Expression

  # To load completions for every new session, run:
  PS> arkade completion powershell > arkade.ps1
  # and source this file from your PowerShell profile.
`

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

kubectl version
uname -a

cat /etc/os-release
$ arkade version
Version: 0.8.5
Git Commit: ef3938e08a51af9eacb3c920c1f5222eac76f0ab
alexellis commented 3 years ago

Go ahead 👍