96 lines
2 KiB
Bash
96 lines
2 KiB
Bash
#!/usr/bin/env zsh
|
|
|
|
DOTFILES=$HOME/.dotfiles
|
|
ADOTDIR=$DOTFILES/vendor/zsh-users/antigen/
|
|
GREP_EXCLUDE_DIR="{.git,.sass-cache,artwork,node_modules,vendor}"
|
|
|
|
export CLICOLOR=1
|
|
export EDITOR=vim
|
|
export KEYTIMEOUT=1
|
|
export TERM="xterm-256color"
|
|
|
|
bindkey -v
|
|
|
|
source $DOTFILES/zsh/`uname`.zshrc
|
|
source $DOTFILES/vendor/zsh-users/antigen/antigen.zsh
|
|
|
|
antigen-use oh-my-zsh
|
|
antigen-theme $DOTFILES/zsh joshtronic
|
|
|
|
antigen-bundle zsh-users/zsh-completions
|
|
antigen-bundle zsh-users/zsh-syntax-highlighting
|
|
antigen-bundle zsh-users/zsh-history-substring-search
|
|
|
|
antigen-apply
|
|
|
|
bindkey '^[[A' history-substring-search-up
|
|
bindkey '^[[B' history-substring-search-down
|
|
|
|
# Git aliases
|
|
alias g='git'
|
|
alias ga='git add'
|
|
alias gaa='git add -all'
|
|
alias gc='git commit -v'
|
|
alias gca='git commit -a -v'
|
|
alias gcb='git checkout -b'
|
|
alias gcm='git checkout master'
|
|
alias gco='git checkout'
|
|
alias gd='git diff'
|
|
alias gf='git fetch origin $(git_current_branch)'
|
|
alias gl='git pull origin $(git_current_branch)'
|
|
alias glg='git log'
|
|
alias gm='git merge'
|
|
alias gmm='git merge master'
|
|
alias gmv='git mv'
|
|
alias gp='git push origin $(git_current_branch)'
|
|
alias grm='git rm'
|
|
alias gst='git status'
|
|
|
|
# HTTPie aliases
|
|
alias GET='http'
|
|
alias POST='http POST'
|
|
alias HEAD='http HEAD'
|
|
alias dl='http --print=b --download'
|
|
|
|
# Ship
|
|
alias ship="$DOTFILES/vendor/fetchlogic/ship/ship"
|
|
|
|
# Tmuxinator
|
|
alias m="mux start"
|
|
|
|
# UUID
|
|
alias uuid=uuidgen
|
|
|
|
# Vim aliases
|
|
alias v=vim
|
|
alias vd=vimdiff
|
|
|
|
# Because `npm` shit the bed on me...
|
|
ulimit -n 4096
|
|
|
|
# `ls` after `cd`
|
|
function cd {
|
|
builtin cd "$@" && ls -F
|
|
}
|
|
|
|
# Colorful man pages
|
|
man() {
|
|
env \
|
|
LESS_TERMCAP_md=$'\e[1;36m' \
|
|
LESS_TERMCAP_me=$'\e[0m' \
|
|
LESS_TERMCAP_se=$'\e[0m' \
|
|
LESS_TERMCAP_so=$'\e[1;40;92m' \
|
|
LESS_TERMCAP_ue=$'\e[0m' \
|
|
LESS_TERMCAP_us=$'\e[1;32m' \
|
|
man "$@"
|
|
}
|
|
|
|
ssh() {
|
|
if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then
|
|
tmux rename-window "$*"
|
|
command ssh "$@"
|
|
tmux set-window-option automatic-rename "on" 1>/dev/null
|
|
else
|
|
command ssh "$@"
|
|
fi
|
|
}
|