Skip to content

Commit

Permalink
Update suggested hook configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn Sommer committed Jan 18, 2024
1 parent 3667508 commit a31eaf6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## v1.0.10
- Update hook help to optimize instantiation performance

## v1.0.9
- Write kubeconfig asynchronous to optimize shell instantiation

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ For this plugin to operate the following dependencies are required:
**If you are setting a custom KUBECONFIG you need to load the shell hook AFTER your KUBECONFIG variable is set**

For BASH, append the following to your ~/.bashrc somewhere after your `KUBECONFIG` variable
`eval "$(kubectl shell-ctx hook bash)"`
`eval "$(kubectl-shell_ctx hook bash)"`

For ZSH, append the following to your ~/.zshrc somewhere after your `KUBECONFIG` variable
`eval "$(kubectl shell-ctx hook zsh)"`
`eval "$(kubectl-shell_ctx hook zsh)"`

For FISH, append the following to your ~/.config/fish/config.fish somewhere after your `KUBECONFIG` variable
`kubectl shell-ctx hook fish | source`
`kubectl-shell_ctx hook fish | source`

## Usage
`kubectl shell-ctx` Select context; Use arrow-keys or start typing to search
Expand Down
8 changes: 4 additions & 4 deletions kubectl-shell_ctx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Kubernetes shell independent context switching
# Version: 1.0.9
# Version: 1.0.10

set -eou pipefail

Expand Down Expand Up @@ -41,17 +41,17 @@ do_help_hook() {
BASH: append the following to your ~/.bashrc:
eval "\$($SELF hook bash)"
eval "\$($(basename "$0") hook bash)"
ZSH: append the following to your ~/.zshrc:
eval "\$($SELF hook zsh)"
eval "\$($(basename "$0") hook zsh)"
FISH: append the following to your ~/.config/fish/config.fish:
$SELF hook fish | source
$(basename "$0") hook fish | source
EOF
Expand Down

0 comments on commit a31eaf6

Please sign in to comment.