dotfiles/zsh/zshrc

35 lines
743 B
Bash

# Always start tmux if it isn't yet.
if [ -z "$TMUX" ]
then
tmux
fi
# History improvements
export HISTFILE=~/.zsh_history
export HISTFILESIZE=1000000000
export HISTSIZE=1000000000
export SAVEHIST=100000
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_ALL_DUPS
# PATH
export PATH=$PATH:$HOME/.bin
# ALIASES
alias k=kubectl
# TOOLS
kubectl () {
command kubectl $*
if [[ -z $KUBECTL_COMPLETE ]]
then
source <(command kubectl completion zsh)
KUBECTL_COMPLETE=1
fi
}
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Starship
export STARSHIP_CONFIG=~/.starship.toml
eval "$(starship init zsh)"