Browse files

Update bashrc and gitconfig

Imported shell aliases from zsh and added a selection to gitconfig
  • Loading branch information...
1 parent af417ca commit a2ee24a0d3b00794af7f93a478a9807a8e31ceed @djs committed Apr 29, 2013
Showing with 213 additions and 9 deletions.
  1. +174 −0 .bash_aliases
  2. +26 −9 .bashrc
  3. +13 −0 .gitconfig
@@ -0,0 +1,174 @@
+# These aliases have been pulled in from zprezto and modified to work with bash
+# Pull in git completion functions to add completions for aliases
+if [ -f /usr/share/bash-completion/completions/git ]; then
+ . /usr/share/bash-completion/completions/git
+_git_log_medium_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
+_git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'
+_git_log_brief_format='%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n'
+alias _=sudo
+alias df='df -kh'
+alias du='du -kh'
+alias g=git
+__git_complete g __git_main
+alias gCO='gCo $(gCl)'
+alias gCT='gCt $(gCl)'
+alias gCa='git add $(gCl)'
+alias gCe='git mergetool $(gCl)'
+alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
+alias gCo='git checkout --ours --'
+alias gCt='git checkout --theirs --'
+alias gR='git remote'
+__git_complete gR _git_remote
+alias gRa='git remote add'
+alias gRb=git-hub-browse
+alias gRc='git remote prune'
+alias gRl='git remote --verbose'
+alias gRm='git remote rename'
+alias gRs='git remote show'
+alias gRu='git remote update'
+alias gRx='git remote rm'
+alias gS='git submodule'
+__git_complete gS _git_submodule
+alias gSI='git submodule update --init --recursive'
+alias gSa='git submodule add'
+alias gSf='git submodule foreach'
+alias gSi='git submodule init'
+alias gSl='git submodule status'
+alias gSm=git-submodule-move
+alias gSs='git submodule sync'
+alias gSu='git submodule foreach git pull origin master'
+alias gSx=git-submodule-remove
+alias gb='git branch'
+__git_complete gb _git_branch
+alias gbL='git branch -av'
+__git_complete gbL _git_remote
+alias gbM='git branch -M'
+__git_complete gbM _git_remote
+alias gbS='git show-branch -a'
+__git_complete gbS _git_show_branch
+alias gbX='git branch -D'
+__git_complete gbX _git_branch
+alias gbc='git checkout -b'
+__git_complete gbc _git_checkout
+alias gbl='git branch -v'
+__git_complete gbl _git_branch
+alias gbm='git branch -m'
+__git_complete gbm _git_branch
+alias gbs='git show-branch'
+__git_complete gbs _git_show_branch
+alias gbx='git branch -d'
+__git_complete gbx _git_branch
+alias gc='git commit --verbose'
+alias gcF='git commit --verbose --amend'
+alias gcO='git checkout --patch'
+alias gcP='git cherry-pick --no-commit'
+alias gcR='git reset "HEAD^"'
+alias gca='git commit --verbose --all'
+alias gcf='git commit --amend --reuse-message HEAD'
+alias gcl=git-commit-lost
+alias gcm='git commit --message'
+alias gco='git checkout'
+alias gcp='git cherry-pick --ff'
+alias gcr='git revert'
+alias gcs='git show'
+alias gd='git ls-files'
+alias gdc='git ls-files --cached'
+alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
+alias gdk='git ls-files --killed'
+alias gdm='git ls-files --modified'
+alias gdu='git ls-files --other --exclude-standard'
+alias gdx='git ls-files --deleted'
+alias get='wget --continue --progress=bar --timestamping'
+alias gf='git fetch'
+alias gfc='git clone'
+alias gfm='git pull'
+alias gfr='git pull --rebase'
+alias gg='git grep'
+alias ggL='git grep --files-without-matches'
+alias ggi='git grep --ignore-case'
+alias ggl='git grep --files-with-matches'
+alias ggv='git grep --invert-match'
+alias ggw='git grep --word-regexp'
+alias giA='git add --patch'
+alias giD='git diff --no-ext-diff --cached --word-diff'
+alias giR='git reset --patch'
+alias giX='git rm -rf --cached'
+alias gia='git add'
+alias gid='git diff --no-ext-diff --cached'
+alias gir='git reset'
+alias gist='nocorrect gist'
+alias giu='git add --update'
+alias gix='git rm -r --cached'
+alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
+alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
+alias glc='git shortlog --summary --numbered'
+alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
+alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
+alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
+alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
+alias gm='git merge'
+alias gmC='git merge --no-commit'
+alias gmF='git merge --no-ff'
+alias gma='git merge --abort'
+alias gmt='git mergetool'
+alias gp='git push'
+alias gpA='git push --all && git push --tags'
+alias gpa='git push --all'
+alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
+alias gpf='git push --force'
+alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
+alias gpt='git push --tags'
+alias gr='git rebase'
+alias gra='git rebase --abort'
+alias grc='git rebase --continue'
+alias gri='git rebase --interactive'
+alias grs='git rebase --skip'
+alias gs='git stash'
+alias gsL='git stash show --patch --stat'
+alias gsS='git stash save --patch --no-keep-index'
+alias gsX=git-stash-clear-interactive
+alias gsa='git stash apply'
+alias gsd=git-stash-dropped
+alias gsl='git stash list'
+alias gsp='git stash pop'
+alias gsr=git-stash-recover
+alias gss='git stash save --include-untracked'
+alias gsw='git stash save --include-untracked --keep-index'
+alias gsx='git stash drop'
+alias gwC='git clean -f'
+alias gwD='git diff --no-ext-diff --word-diff'
+alias gwR='git reset --hard'
+alias gwS='git status --ignore-submodules="${_git_status_ignore_submodules}"'
+alias gwX='git rm -rf'
+alias gwc='git clean -n'
+alias gwd='git diff --no-ext-diff'
+alias gwr='git reset --soft'
+alias gws='git status --ignore-submodules="${_git_status_ignore_submodules}" --short'
+alias gwx='git rm -r'
+alias history='noglob history'
+alias history-stat='history 0 | awk ''{print $2}'' | sort | uniq -c | sort -n -r | head'
+alias j='fasd_cd -i'
+alias l='ls -1A'
+alias la='ll -A'
+alias lc='lt -c'
+alias lk='ll -Sr'
+alias ll='ls -lh'
+alias lm='la | "$PAGER"'
+alias ln='nocorrect ln -i'
+alias locate='noglob locate'
+alias lr='ll -R'
+alias ls='ls --group-directories-first --color=auto'
+alias lt='ll -tr'
+alias lu='lt -u'
+alias lx='ll -XB'
+alias po=popd
+alias pu=pushd
+alias rsync='noglob rsync'
+alias rsync-copy='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
+alias rsync-move='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system --remove-source-files'
+alias rsync-synchronize='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system --update --delete'
+alias rsync-update='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system --update'
35 .bashrc
@@ -1,23 +1,40 @@
-alias ls='ls --color=auto'
-alias ll='ls -alF'
-alias grep='grep --color=auto'
-alias grep='fgrep --color=auto'
-alias grep='egrep --color=auto'
+set -o vi
export HISTSIZE=2000
export HISTCONTROL=ignorespace:ignoredups
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S '
export HISTIGNORE='pwd:ls:ll'
-alias bot='cd $(dirname $(find . | tail -1))'
shopt -s cdspell
-alias g='git'
-complete -o default -o nospace -F _git g
+shopt -s cmdhist
+shopt -s dirspell
+shopt -s extglob
+shopt -s histappend
+# enable bash completion in interactive shells
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+if [ -f ~/.bash_aliases ]; then
+ source ~/.bash_aliases
+# ------------------------------------------------------------------
+# Options for msysgit bash
+# ------------------------------------------------------------------
if [ "$MSYSTEM" ]; then
alias xclip=clip
+ # Virtualenvwrapper config for msys
+ #
export WORKON_HOME=$HOME/.virtualenvs
- if [ -e /c/Python27/Scripts/ ]; then
+ if [ -f /c/Python27/Scripts/ ]; then
source /c/Python27/Scripts/
@@ -1,6 +1,8 @@
name = Dan Savilonis
email =
+ ui = auto
fontdiff = -family \"Liberation Mono\" -size 10 -weight normal -slant roman -underline 0 -overstrike 0
spellingdictionary = en_US
@@ -27,3 +29,14 @@
amend = commit --amend
dc = diff --cached
ri = rebase --interactive
+ g = grep -n
+ gi = grep -in
+ gL = git grep --files-without-matches
+ gl = grep --files-with-matches
+ gv = grep --invert-match
+ gw = grep --word-regexp
+ mt = mergetool
+ rs = reset --soft
+ l = log --topo-order --pretty=format:'%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
+ lg = log --topo-order --all --graph --pretty=format:'%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'

0 comments on commit a2ee24a

Please sign in to comment.