Last active
February 13, 2017 15:14
-
-
Save sibljon/3746903 to your computer and use it in GitHub Desktop.
Bash Settings
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
# Add `~/bin` to the `$PATH` | |
export PATH="$HOME/bin:$PATH" | |
# Python 3.5 packages | |
export PATH="$PATH:~/Library/Python/3.5/bin" | |
# Sublime Text - http://stackoverflow.com/a/16495202 | |
export EDITOR='subl -w' | |
# Load the shell dotfiles, and then some: | |
# * ~/.path can be used to extend `$PATH`. | |
# * ~/.extra can be used for other settings you don’t want to commit. | |
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do | |
[ -r "$file" ] && [ -f "$file" ] && source "$file" | |
done | |
unset file | |
# Case-insensitive globbing (used in pathname expansion) | |
shopt -s nocaseglob | |
# Append to the Bash history file, rather than overwriting it | |
shopt -s histappend | |
# If possible, add tab completion for many more commands | |
[ -f /etc/bash_completion ] && source /etc/bash_completion | |
# ### | |
# Jon's additions: | |
# ### | |
alias gs='git status' | |
alias gco='git checkout' | |
alias gcol='git checkout -' | |
alias gcob='git checkout -b' | |
alias gcom='git checkout master' | |
alias gsta='git stash save -U' | |
alias gstk='git stash save --keep-index' | |
alias gb="git for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'" | |
alias gm="git merge --no-edit" | |
# Delete Xcode's derived data folder | |
alias fuxcode='rm -rf ~/Library/Developer/Xcode/DerivedData' | |
alias sourcetree='open -a SourceTree ./' | |
# Make prompt in the following form: | |
# top_level_directory_name(git_branch_name) [hamburger unicode character] | |
source ~/.git-prompt.sh | |
# PS1='$(__git_ps1 "%s") 🏀 \[\e[0m\] ' | |
PS1='\[\e[1;32m\]$(__git_ps1 "%s") 🏀 \[\e[0m\] ' | |
# Reinstall cocoapods in an Xcode project's directory | |
alias podstall='rm -rf Podfile.lock; rm -rf Pods; pod install --verbose' | |
# Git autocompletion | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$HOME/bin | |
export GO15VENDOREXPERIMENT=1 | |
export EDITOR=/usr/bin/vim | |
# iOS Fastlane | |
export FASTLANE_FAILURE_SLACK_NOTIFY_WEBHOOK="https://hooks.slack.com/services/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" | |
# Add RVM to PATH for scripting | |
export PATH="$PATH:$HOME/.rvm/bin" | |
# For iTerm2 badge (https://iterm2.com/documentation-badges.html) | |
function iterm2_print_user_vars() { | |
# iterm2_set_user_var gitBranch $((git branch 2> /dev/null) | grep \* | cut -c3-) | |
iterm2_set_user_var topLevelDirectoryName "${PWD##*/}" | |
} | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" |
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
alias ls='ls -G' | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment