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

Commit

Permalink
README: More defensive alias
Browse files Browse the repository at this point in the history
Will not break kubectl if "kubecolor" command is not on PATH.
  • Loading branch information
schnatterer committed Feb 21, 2021
1 parent 4d390aa commit eb02704
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -31,6 +31,12 @@ you can use kubecolor as a complete alternative of kubectl. It means you can wri
```sh
alias kubectl="kubecolor"
```
If you use your .bash_profile on more than one computer (e.g. synced via git) that might not all have `kubecolor`
installed, you can avoid breaking `kubectl` like so:

```sh
command -v kubecolor >/dev/null 2>&1 && alias kubectl="kubecolor"
```

kubecolor is developed to colorize the output of only READ commands (get, describe...).
So if the given subcommand was for WRITE operations (apply, edit...), it doesn't give great decorations on it.
Expand Down

0 comments on commit eb02704

Please sign in to comment.