-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zsh closeout sale, everything must go!!!!
- Loading branch information
Showing
18 changed files
with
146 additions
and
284 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
path=(~/.rbenv/shims ~/.rbenv/bin/ ~/bin ~/usr/local/bin $path) | ||
path=(~/.rbenv/shims ~/.rbenv/bin/ ~/bin /usr/local/bin $path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
setopt hist_ignore_dups | ||
setopt hist_verify | ||
setopt inc_append_history | ||
setopt extended_history # Timestamp history | ||
setopt hist_ignore_space | ||
HISTFILE=$HOME/.zsh_history | ||
HISTSIZE=10000 | ||
SAVEHIST=10000 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Git | ||
|
||
function git-current-branch() { | ||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | ||
echo ${ref#refs/heads/} | ||
} | ||
|
||
function git-track() { | ||
remote=${1:-"origin"} | ||
branch=$(git-current-branch) | ||
git branch --set-upstream $branch $remote/$branch | ||
} | ||
|
||
function git-commits-behind() { | ||
git rev-list --count --left-only @{upstream}...HEAD | ||
} | ||
|
||
function git-commits-ahead() { | ||
git rev-list --count --right-only @{upstream}...HEAD | ||
} | ||
|
||
function git-can-ff() { | ||
a="$(git rev-parse "$1")" && | ||
test "$(git merge-base "$a" "$2")" = "$a" | ||
} | ||
|
||
if [ "$commands[(I)hub]" ]; then | ||
# eval `hub alias -s zsh` | ||
function git(){hub "$@"} | ||
fi | ||
|
||
alias g='git' | ||
compdef g=git | ||
alias gst='git status' | ||
compdef _git gst=git-status | ||
alias gl='git pull' | ||
compdef _git gl=git-pull | ||
alias gup='git fetch && git rebase' | ||
compdef _git gup=git-fetch | ||
alias gp='git push' | ||
compdef _git gp=git-push | ||
gd() { git diff -w "$@" | view - } | ||
compdef _git gd=git-diff | ||
alias gc='git commit -v' | ||
compdef _git gc=git-commit | ||
alias gca='git commit -v -a' | ||
compdef _git gca=git-commit | ||
alias gco='git checkout' | ||
compdef _git gco=git-checkout | ||
alias gb='git branch' | ||
compdef _git gb=git-branch | ||
alias gba='git branch -a' | ||
compdef _git gba=git-branch | ||
alias gcount='git shortlog -sn' | ||
compdef gcount=git | ||
alias gcp='git cherry-pick' | ||
compdef _git gcp=git-cherry-pick | ||
alias glg='git log --stat --max-count=5' | ||
compdef _git glg=git-log | ||
alias ga='git add' | ||
compdef _git ga='git-add' | ||
alias gf='git fetch' | ||
compdef _git gf='git-fetch' | ||
alias gr='git remote -v' | ||
compdef _git gr='git-remote' | ||
alias gm='git merge' | ||
compdef _git gm='git-merge' | ||
alias gmu='git merge @{upstream}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
alias be="bundle exec" | ||
alias bi="bundle install" | ||
alias bu="bundle update" | ||
|
||
function _bundle_command { | ||
if command -v bundle && [ -e "Gemfile" ]; then | ||
bundle exec $@ | ||
else | ||
$@ | ||
fi | ||
} | ||
|
||
function _rails_command () { | ||
if [ -e "script/server" ]; then | ||
ruby script/$@ | ||
else | ||
ruby script/rails $@ | ||
fi | ||
} | ||
|
||
|
||
alias rc='_rails_command console' | ||
alias rd='_rails_command destroy' | ||
alias rdb='_rails_command dbconsole' | ||
alias rdbm='rake db:migrate db:test:clone' | ||
alias rg='_rails_command generate' | ||
alias rp='_rails_command plugin' | ||
alias rs='_rails_command server' | ||
alias rsd='_rails_command server --debugger' | ||
alias v='bundle exec vagrant' | ||
alias vs='bundle exec vagrant ssh' | ||
alias vu='bundle exec vagrant up' | ||
alias vd='bundle exec vagrant destroy' | ||
alias vp='bundle exec vagrant provision' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.