Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

feat: add fish shell completions to README #52

Merged
merged 7 commits into from Mar 11, 2021
23 changes: 22 additions & 1 deletion README.md
Expand Up @@ -135,7 +135,28 @@ compdef kubecolor=kubectl

#### fish

Fish completion is unsupported because fish completion is officially not supported by kubectl.
Fish completion is officially unsupported by `kubectl`, so it is unsupported by `kubecolor` as well.

However, there are 2 ways we can make them work. Please keep in mind these are a kind of "hack" and not officially supported.

1. Use [evanlucas/fish-kubectl-completions](https://github.com/evanlucas/fish-kubectl-completions) with `kubecolor`:

* Install `kubectl` completions (https://github.com/evanlucas/fish-kubectl-completions):
```
fisher install evanlucas/fish-kubectl-completions
```
* Add the following function to your `config.fish` file:
```
function kubectl
kubecolor $argv
end
```
2. Use [awinecki/fish-kubecolor-completions](https://github.com/awinecki/fish-kubecolor-completions)

The first way will override `kubectl` command. If you wish to preserve both `kubectl` and `kubecolor` with completions, you need to copy [evanlucas/fish-kubectl-completions](https://github.com/evanlucas/fish-kubectl-completions) for the `kubecolor` command.

For this purpose, you can use [awinecki/fish-kubecolor-completions](https://github.com/awinecki/fish-kubecolor-completions).


### Specify what command to execute as kubectl

Expand Down