|
|
|
#
|
|
|
|
# Executes commands at the start of an interactive session.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Set the list of directories that Zsh searches for programs.
|
|
|
|
#
|
|
|
|
fpath=(
|
|
|
|
$DOTFILES/zsh/functions
|
|
|
|
$fpath
|
|
|
|
)
|
|
|
|
|
|
|
|
typeset -gU fpath
|
|
|
|
|
|
|
|
#
|
|
|
|
# Use Antigen
|
|
|
|
#
|
|
|
|
|
|
|
|
if [[ -s "$DOTFILES/zsh/antigen/antigen.zsh" ]]; then
|
|
|
|
source "$DOTFILES/zsh/antigen/antigen.zsh"
|
|
|
|
|
|
|
|
antigen use prezto
|
|
|
|
|
|
|
|
antigen bundle nojhan/liquidprompt
|
|
|
|
|
|
|
|
antigen apply
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Git
|
|
|
|
#
|
|
|
|
|
|
|
|
# Revive old gst alias from OMZ/git
|
|
|
|
alias gst="git status"
|
|
|
|
|
|
|
|
# git update fork
|
|
|
|
# Merge upstream
|
|
|
|
function gupf {
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
local ORIGIN=${1-origin}
|
|
|
|
local UPSTREAM=${2-upstream}
|
|
|
|
local LBRANCH=`git symbolic-ref --short HEAD`
|
|
|
|
local OBRANCH=${3-$LBRANCH}
|
|
|
|
local UBRANCH=${4-$OBRANCH}
|
|
|
|
git fetch $ORIGIN
|
|
|
|
git fetch $UPSTREAM
|
|
|
|
git checkout $ORIGIN/$OBRANCH
|
|
|
|
git checkout -b merge
|
|
|
|
git merge $UPSTREAM/$UBRANCH -m "merge upstream from `git ls-remote --get-url $UPSTREAM`"
|
|
|
|
git checkout $LBRANCH
|
|
|
|
git rebase merge
|
|
|
|
git branch -d merge
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# rsync
|
|
|
|
#
|
|
|
|
|
|
|
|
alias rsync="rsync -aXzPvihs -e ssh"
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# NeoVim
|
|
|
|
#
|
|
|
|
|
|
|
|
if (( $+commands[nvim] )); then
|
|
|
|
alias vim=nvim
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Local overrides
|
|
|
|
#
|
|
|
|
|
|
|
|
[[ -e "$DOTFILES/zsh/zshrc.local" ]] && source "$DOTFILES/zsh/zshrc.local"
|
|
|
|
|