Created
January 24, 2018 05:40
-
-
Save jkakar/0176daac42aced1edf4928ce1bbab015 to your computer and use it in GitHub Desktop.
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
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=1000000 | |
HISTFILESIZE=1000000000 | |
# Prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
git_branch_separator() { | |
[[ $(parse_git_branch) = "" ]] && echo "" || echo ":" | |
} | |
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[1;00m\]\[\033[00m\]$(git_branch_separator)\[\033[01;34m\]\[\033[1;90m\]$(parse_git_branch)\[\033[00m\]$ ' | |
alias be='bundle exec' | |
alias find='gfind' | |
alias h='heroku' | |
alias hs='heroku sudo' | |
alias ls='gls --color' | |
alias rm='grm' | |
alias sed='gsed' | |
alias tree='tree -C' | |
alias uniq='guniq' | |
dashi() { | |
QUERY=$(python -c "import urllib;print urllib.quote(raw_input())" <<< "$@") | |
open https://dashi-api.herokuapp.com/$QUERY | |
} | |
alias ds=dashi | |
export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH: | |
export EDITOR=$HOME/bin/emacs | |
# Syntax highlighting | |
# | |
# Setup: brew install highlight | |
export LESSOPEN="| $(which highlight) %s --out-format xterm256 --quiet --force --style solarized-dark" | |
export LESS=" -R" | |
alias more='less' | |
export GPG_TTY=$(tty) | |
export GPGKEY=4742118D | |
# Git | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# Go | |
export GOPATH=$HOME | |
export PATH="$HOME/.cargo/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment