Created
June 30, 2012 15:27
-
-
Save matiskay/3024246 to your computer and use it in GitHub Desktop.
My config file
This file contains hidden or 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
# \u Username | |
# \w Current directory | |
# \d Date | |
# \D{fmt} Date as sprintf | |
# \h Subdomain | |
# \H Full hostname | |
# Get more colors from archlinux wiki color bash prompt | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" | |
local WHITE="\[\033[1;37m\]" | |
local LIGHT_GRAY="\[\033[0;37m\]" | |
case $TERM in | |
xterm*) | |
TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
;; | |
*) | |
TITLEBAR="" | |
;; | |
esac | |
# Escape [ $ ] using \ | |
# for example | |
# \[$EBLACK\] | |
# \$(my_awesome_function) | |
PS1="${TITLEBAR}\ | |
$BLUE[$RED\u@\h:\w$GREEN\$(parse_git_branch) $LIGHT_GRAY\$\ | |
$WHITE\$ " | |
PS2='> ' | |
PS4='+ ' | |
} | |
proml | |
# Color man pages | |
# Less Colors for Man Pages | |
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking | |
export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold | |
export LESS_TERMCAP_me=$'\E[0m' # end mode | |
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode | |
export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box | |
export LESS_TERMCAP_ue=$'\E[0m' # end underline | |
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment