# # Executes commands at the start of an interactive session. # # Authors: # Sorin Ionescu # # Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi # Customize to your needs... [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh source ~/.fzf.zsh [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh fasd_cache="$HOME/.fasd-init-zsh" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache export PATH=~/.local/bin:$PATH # timing the commands function ts_preexec() { timer=${timer:-$SECONDS} } add-zsh-hook preexec ts_preexec function ts_precmd() { if [ $timer ]; then timer_show=$(($SECONDS - $timer)) export RPROMPT="%* %F{cyan}${timer_show}s %{$reset_color%}" unset timer fi } add-zsh-hook precmd ts_precmd