mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 08:46:39 +00:00
chore(zsh): various tweaks to zsh env setup and helpers
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
# Google Cloud SDK setup.
|
||||
#
|
||||
|
||||
if [ -f '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc' ]; then
|
||||
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
|
||||
fi
|
||||
|
||||
# Lazy load gcloud shell completion on first use.
|
||||
if command-exists gcloud; then
|
||||
_python_argcomplete() {
|
||||
@@ -17,8 +13,8 @@ if command-exists gcloud; then
|
||||
|
||||
load-gcloud-completion() {
|
||||
unset -f load-gcloud-completion _python_argcomplete
|
||||
if [ -f '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc' ]; then
|
||||
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'
|
||||
if [ -n "$HOMEBREW_PREFIX" ]; then
|
||||
source-if-exists "${HOMEBREW_PREFIX}/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -23,11 +23,13 @@ if command-exists kubectl; then
|
||||
}
|
||||
_setup-kubectl-completion
|
||||
|
||||
switch() {
|
||||
unset -f switch
|
||||
source "$(brew --prefix switch)/switch.sh"
|
||||
switch "$@"
|
||||
}
|
||||
if command-exists brew-prefix; then
|
||||
switch() {
|
||||
unset -f switch
|
||||
source "$(brew-prefix switch)/switch.sh"
|
||||
switch "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
export KREW_ROOT="$HOME/.krew"
|
||||
path_append "${KREW_ROOT}/bin"
|
||||
|
||||
Reference in New Issue
Block a user