Skip to content

Instantly share code, notes, and snippets.

@sebm
Created October 26, 2012 19:34
Show Gist options
  • Save sebm/3960959 to your computer and use it in GitHub Desktop.
Save sebm/3960959 to your computer and use it in GitHub Desktop.
some bash stuff
set_prompt_style () {
local bldpur='\e[1;35m' # Purple
local bldblu='\e[1;34m' # Blue
local bldblk='\e[1;30m' # Black - Bold
local bldred='\e[1;31m' # Red
local txtrst='\e[0m' # Text Reset
# local bashuser="\[$bldpur\]\u@\[$txtrst\]" # username
local bashhost="\[$bldpur\]\h\[$txtrst\]" # hostname
local bashdir="\[$bldblu\]\w\[$txtrst\]" # directory
local bashprompt="\[$bldblk\]: \[$txtrst\]" # prompt symbol
if [ `whoami` == "root" ] ; then
# local bashuser="\[$bldred\]\u@\[$txtrst\]"
local bashhost="\[$bldred\]\h\[$txtrst\]"
fi
PS1="$bashuser$bashhost $bashdir$bashprompt"
}
set_prompt_style
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
alias hgrep="history | grep"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment