Skip to content

Instantly share code, notes, and snippets.

View sleicester's full-sized avatar

Sam Leicester sleicester

View GitHub Profile
@sleicester
sleicester / .bash_profile
Created January 25, 2014 17:30
.bash_profile that includes more colour, maintains history between tabs by writing each prompt display, also allows the user of up to traverse through items that start with x
source ~/.profile
# Setup binary path locations
export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
export EDITOR='subl -w'
# Make Bash append rather than overwrite the history on disk:
shopt -s histappend
# Whenever displaying the prompt, write the previous line to disk:
@sleicester
sleicester / .inputrc
Created January 25, 2014 18:13
.inputrc This helps history search based on what you type and pressing the up and down keys
# Incremental searching with Up and Down keys
# http://www.ukuug.org/events/linux2003/papers/bash_tips/#slide12
"\e[A": history-search-backward
"\e[B": history-search-forward
@sleicester
sleicester / .profile
Created January 25, 2014 18:23
.profile with some neat aliases and coloured prompt, particularly useful is the display of current git branch
# found this here:
# http://blog.taylormcgann.com/tag/prompt-color/
# git commamands simplified
alias gst='git status'
alias gco='git checkout'
alias gci='git commit'
alias grb='git rebase'
alias gbr='git branch'
alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"'