# autoload and kickoff autoload -Uz colors vcs_info compinit compinit colors # Make sure moving by whole word can stop at directories WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' # history support, time reporting, auto-cd HISTFILE=~/.zhistory HISTSIZE=5000 SAVEHIST=5000 setopt INC_APPEND_HISTORY setopt EXTENDED_HISTORY setopt HIST_IGNORE_ALL_DUPS setopt HIST_IGNORE_SPACE setopt AUTO_CD setopt PROMPT_SUBST SCRIPTPATH=$HOME/.config/dotfiles/zsh # Use emacs-style binds instead of vim bindkey -e # google cloud sdk if [[ -a "/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" fi # history substring search if [[ -a "$SCRIPTPATH/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then source "$SCRIPTPATH/zsh-history-substring-search/zsh-history-substring-search.zsh" bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down fi # extra autocompletions if [[ -a "$SCRIPTPATH/zsh-completions/zsh-completions.plugin.zsh" ]]; then fpath=($SCRIPTPATH/zsh-completions/src $fpath) fi # starship if [[ -x "$(command -v starship)" ]]; then export STARSHIP_CONFIG="$HOME/.config/starship/starship.toml" eval "$(starship init zsh)" fi # asdf if [[ -d "$HOME/.asdf/completions" ]]; then fpath=($HOME/.asdf/completions $fpath) fi