Dotfiles
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.

71 lines
1.3 KiB

11 years ago
#
# Executes commands at the start of an interactive session.
#
#
#
9 years ago
# Set the list of directories that Zsh searches for programs.
#
9 years ago
fpath=(
$DOTFILES/zsh/functions
$fpath
)
typeset -gU fpath
#
11 years ago
# Source Prezto.
#
11 years ago
if [[ -s "${ZDOTDIR}/prezto/init.zsh" ]]; then
source "${ZDOTDIR}/prezto/init.zsh"
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}
9 years ago
local LBRANCH=`git symbolic-ref --short HEAD`
local OBRANCH=${3-$LBRANCH}
local UBRANCH=${4-$OBRANCH}
git fetch $ORIGIN
git fetch $UPSTREAM
9 years ago
git checkout $ORIGIN/$OBRANCH
git checkout -b merge
9 years ago
git merge $UPSTREAM/$UBRANCH -m "merge upstream from `git ls-remote --get-url $UPSTREAM`"
git checkout $LBRANCH
git rebase merge
git branch -d merge
)
}
#
# SSH
#
if (( $+commands[systemctl] )); then
eval "$(systemctl --user show-environment | grep '^SSH_AUTH_SOCK=')"
fi
if [ -n $SSH_AUTH_SOCK -a -f "$XDG_RUNTIME_DIR/ssh-agent.sock" ]; then
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.sock"
fi
export SSH_AUTH_SOCK
#
# rsync
#
8 years ago
alias rsync="rsync -aXzPvihs -e ssh"
#
# Local overrides
#
10 years ago
[[ -e "$DOTFILES/zsh/zshrc.local" ]] && source "$DOTFILES/zsh/zshrc.local"