mirror of
https://github.com/kremalicious/dotfiles.git
synced 2024-11-22 01:37:14 +01:00
faster shell startup
This commit is contained in:
parent
b08371bc53
commit
011aa2d57d
13
exports
13
exports
@ -25,20 +25,19 @@ export CDPATH=$CDPATH:~/Code
|
|||||||
|
|
||||||
# nvm
|
# nvm
|
||||||
# defer loading until needed for faster shell startup
|
# defer loading until needed for faster shell startup
|
||||||
# declare -a NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
|
declare -a NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
|
||||||
|
|
||||||
# NODE_GLOBALS+=("node")
|
NODE_GLOBALS+=("node")
|
||||||
# NODE_GLOBALS+=("nvm")
|
NODE_GLOBALS+=("nvm")
|
||||||
|
|
||||||
load_nvm () {
|
load_nvm () {
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||||
}
|
}
|
||||||
load_nvm
|
|
||||||
|
|
||||||
# for cmd in "${NODE_GLOBALS[@]}"; do
|
for cmd in "${NODE_GLOBALS[@]}"; do
|
||||||
# eval "${cmd}(){ unset -f ${NODE_GLOBALS}; load_nvm; ${cmd} \$@ }"
|
eval "${cmd}(){ unset -f ${NODE_GLOBALS}; load_nvm; ${cmd} \$@ }"
|
||||||
# done
|
done
|
||||||
|
|
||||||
# pip should only run if there is a virtualenv currently activated
|
# pip should only run if there is a virtualenv currently activated
|
||||||
export PIP_REQUIRE_VIRTUALENV=true
|
export PIP_REQUIRE_VIRTUALENV=true
|
||||||
|
4
zprofile
4
zprofile
@ -1,4 +0,0 @@
|
|||||||
# User configuration
|
|
||||||
source ~/.exports
|
|
||||||
source ~/.aliases
|
|
||||||
source ~/.private
|
|
16
zshrc
16
zshrc
@ -46,7 +46,13 @@ setopt pushdminus
|
|||||||
#
|
#
|
||||||
# Completion
|
# Completion
|
||||||
#
|
#
|
||||||
autoload -Uz compinit; compinit
|
autoload -Uz compinit
|
||||||
|
|
||||||
|
for dump in ~/.zcompdump(N.mh+24); do
|
||||||
|
compinit
|
||||||
|
done
|
||||||
|
|
||||||
|
compinit -C
|
||||||
|
|
||||||
setopt auto_menu
|
setopt auto_menu
|
||||||
setopt always_to_end
|
setopt always_to_end
|
||||||
@ -74,7 +80,7 @@ if [[ $#h -gt 0 ]]; then
|
|||||||
zstyle ':completion:*:(ssh|scp|rsync|slogin):*' hosts $h
|
zstyle ':completion:*:(ssh|scp|rsync|slogin):*' hosts $h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
# source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
# source <(kubectl completion zsh)
|
# source <(kubectl completion zsh)
|
||||||
|
|
||||||
@ -82,3 +88,9 @@ source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|||||||
# Other
|
# Other
|
||||||
#
|
#
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
|
source ~/.exports
|
||||||
|
source ~/.aliases
|
||||||
|
source ~/.private
|
||||||
|
|
||||||
|
# zprof
|
||||||
|
Loading…
Reference in New Issue
Block a user