I want to add a new custom plugin to my oh-my-zsh terminal
I created a new directory under ~/.oh-my-zsh/custom/plugins/disable_gke_tunnel.
Added a new file named disable_gke_tunnel.plugin.zsh
disable_gke_tunnel.plugin.zsh:
disable_gke_tunnel() {
echo "Disabling active GKE tunnel and aliases"
alias k='kubectl'
unalias helm > /dev/null 2>&1
unalias kubens > /dev/null 2>&1
ssh -S /tmp/sslsock -O exit gke-mgmt > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "GKE tunnel closed successfully."
else
echo "Failed to close GKE tunnel."
fi
echo "Done!"
}
I added this plugin to the list of plugins under .zshrc
plugins=(
git
web-search
terraform
sudo
copyfile
copypath
gcloud
zsh-autosuggestions
history
gke-tunnel
disable-gke-tunnel
)
Now when I execute the command source ~/.zshrc I get this error:
[oh-my-zsh] plugin 'disable-gke-tunnel' not found
What am I missing ?