You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.0 KiB
46 lines
1.0 KiB
#
|
|
# Executes commands at the start of an interactive session.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
# 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="%t %F{cyan}${timer_show}s %{$reset_color%}"
|
|
unset timer
|
|
fi
|
|
}
|
|
add-zsh-hook precmd ts_precmd
|
|
|