Skip to content

Commit

Permalink
feat: add kubectx installation function and custom completions
Browse files Browse the repository at this point in the history
  • Loading branch information
svg153 committed Jan 24, 2025
1 parent cf3ccf8 commit 29e74a8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ if [ -f ~/.rc ]; then
source ~/.rc
fi

if [ -d "$ZSH/custom/completions" ]; then
fpath=($ZSH/custom/completions $fpath)
fi

# fonts
# https://github.com/gabrielelana/awesome-terminal-fonts
# TODO: fix "not matches found"
Expand Down
13 changes: 13 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,19 @@ function install_minikube()
# - Podman: https://minikube.sigs.k8s.io/docs/drivers/podman/
}

function install_kubectx()
{
# https://github.com/ahmetb/kubectx/?tab=readme-ov-file#manual-installation-macos-and-linux
sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx
sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx
sudo ln -s /opt/kubectx/kubens /usr/local/bin/kubens

mkdir -p ~/.oh-my-zsh/custom/completions
chmod -R 755 ~/.oh-my-zsh/custom/completions
ln -s /opt/kubectx/completion/_kubectx.zsh ~/.oh-my-zsh/custom/completions/_kubectx.zsh
ln -s /opt/kubectx/completion/_kubens.zsh ~/.oh-my-zsh/custom/completions/_kubens.zsh
}

function install_tfenv()
{
# tfenv
Expand Down

0 comments on commit 29e74a8

Please sign in to comment.