I like that this adds a little color to and otherwise dull looking terminal window. From left to right, I'll describe what it includes:
- a fun little alien
- username
- current directory
- Ruby version (via rbenv... you'll have to change this if you use rvm)
- Hearts that deplete throughout the day
- Git branch
- Git 'dirty' status shown with a lightning bolt
To load this, just paste it into your .bash_profile
or, load it from another file, e.g.:
source ~/custom_prompt.bash
Here are some useful bash aliases and functions that I load through .bash_profile
as well:
### Aliases
alias l.='ls -GFhd .*'
alias ls='ls -GFh'
alias be='bundle exec'
alias tree='tree -CAF'
### Functions
function scripted {
cd ~/Scripted
bundle exec foreman start -f Procfile.development
}
function console {
bundle exec pry -r ./config/environment
}
function jira {
open 'https://scripted.atlassian.net/secure/Dashboard.jspa'
}
function gh {
open 'https://github.com/scripted/scripted'
}
function pt {
open 'https://www.pivotaltracker.com/n/projects/991930'
}
function ci {
open 'https://circleci.com/gh/Scripted/Scripted'
}
function gg {
local IFS='+'
local query="$*"
open "https://www.google.com/#q=${query}"
}
function gm {
open 'https://mail.google.com/mail/u/0/#inbox'
}