Merge pull request #57 from jfsiii/master

Eliminate need for themes to add escape characters around colors. Add rainbowbrite theme.
pull/58/head
Mark Szymanski 2011-06-18 08:51:03 -07:00
commit b5efd9044b
24 changed files with 192 additions and 128 deletions

View File

@ -46,6 +46,15 @@ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
alias md='mkdir -p' alias md='mkdir -p'
alias rd=rmdir alias rd=rmdir
# show / hide hidden files
alias showhidden="defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder"
alias hidehidden="defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder"
# display IP address
alias myip="echo ethernet:; ipconfig getifaddr en0; echo wireless:; ipconfig getifaddr en1"
# http://snippets.dzone.com/posts/show/2486
alias killsvn="find . -name ".svn" -type d -exec rm -rf {} \;"
function aliases-help() { function aliases-help() {
echo "Generic Alias Usage" echo "Generic Alias Usage"
echo echo

View File

@ -39,8 +39,6 @@ case $OSTYPE in
;; ;;
esac esac
function git-help() { function git-help() {
echo "Git Custom Aliases Usage" echo "Git Custom Aliases Usage"
echo echo

View File

@ -18,3 +18,6 @@ alias buildsite="builtin cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll"
# Rsync the site to the remote server # Rsync the site to the remote server
alias deploysite="builtin cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT" alias deploysite="builtin cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT"
alias jkas="jekyll --auto --server"
alias rmjkas="rm -rf _site/* && jkas"

View File

@ -14,6 +14,7 @@ alias dashcode="open -a dashcode"
alias f='open -a Finder ' alias f='open -a Finder '
alias textedit='open -a TextEdit' alias textedit='open -a TextEdit'
alias hex='open -a "Hex Fiend"' alias hex='open -a "Hex Fiend"'
alias gitx="open -a GitX"
if [ -s /usr/bin/firefox ] ; then if [ -s /usr/bin/firefox ] ; then
unalias firefox unalias firefox

View File

@ -69,11 +69,11 @@ battery_charge(){
local F_C='▸' local F_C='▸'
# Depleted char # Depleted char
local D_C='▹' local D_C='▹'
local DEPLETED_COLOR='\[${normal}\]' local DEPLETED_COLOR="${normal}"
local FULL_COLOR='\[${green}\]' local FULL_COLOR="${green}"
local HALF_COLOR='\[${yellow}\]' local HALF_COLOR="${yellow}"
local DANGER_COLOR='\[${red}\]' local DANGER_COLOR="${red}"
local BATTERY_OUTPUT='${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}' local BATTERY_OUTPUT="${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}"
local BATTERY_PERC=$(battery_percentage) local BATTERY_PERC=$(battery_percentage)
case $BATTERY_PERC in case $BATTERY_PERC in
@ -123,7 +123,7 @@ battery_charge(){
echo "${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}" echo "${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${normal}"
;; ;;
*) *)
echo "${DANGER_COLOR}UNPLG\[${normal}\]" echo "${DANGER_COLOR}UNPLG${normal}"
;; ;;
esac esac
} }

View File

@ -5,6 +5,13 @@ function git_remote {
git remote add origin $GIT_HOSTING:$1.git git remote add origin $GIT_HOSTING:$1.git
} }
# git add remote branch
function garb() {
echo "Adding remote branch '$1'";
git config branch.$1.remote origin;
git config branch.$1.merge refs/heads/$1;
}
function git_first_push { function git_first_push {
echo "Running: git push origin master:refs/heads/master" echo "Running: git push origin master:refs/heads/master"
git push origin master:refs/heads/master git push origin master:refs/heads/master
@ -92,4 +99,3 @@ else
echo "you're currently not in a git repository" echo "you're currently not in a git repository"
fi fi
} }

View File

@ -26,7 +26,7 @@ editpost() {
fi fi
} }
newpost() { jknewpost() {
# 'builtin cd' into the local jekyll root # 'builtin cd' into the local jekyll root

View File

@ -15,7 +15,7 @@ SCM_HG_CHAR='☿'
SVN='svn' SVN='svn'
SCM_SVN_CHAR='⑆' SCM_SVN_CHAR='⑆'
SCM_NONE_CHAR='' SCM_NONE_CHAR='·'
RVM_THEME_PROMPT_PREFIX=' |' RVM_THEME_PROMPT_PREFIX=' |'
RVM_THEME_PROMPT_SUFFIX='|' RVM_THEME_PROMPT_SUFFIX='|'

View File

@ -4,15 +4,6 @@ SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX=" |" SCM_THEME_PROMPT_PREFIX=" |"
SCM_THEME_PROMPT_SUFFIX="${green}|" SCM_THEME_PROMPT_SUFFIX="${green}|"
# PROMPT="\[${bold_cyan}\]\[\$(scm_char)\]\[${green}\]\[\$(scm_prompt_info)\]\[${purple}\]\[\$(rvm_version_prompt)\] \[${yellow}\]\h \[${reset_color}\]in \[${green}\]\w \[${reset_color}\]\[\n\[${green}\]→\[${reset_color}\] "
PROMPT="\n\[${yellow}\]\[\$(rvm_version_prompt)\] \[${purple}\]\h \[${reset_color}\]in \[${green}\]\w\n\[${bold_cyan}\]\[\$(scm_char)\]\[${green}\]\[\$(scm_prompt_info)\] \[\[${green}\]→\[${reset_color}\] "
# git theming
GIT_THEME_PROMPT_DIRTY=" ${red}" GIT_THEME_PROMPT_DIRTY=" ${red}"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}" GIT_THEME_PROMPT_CLEAN=" ${bold_green}"
GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_PREFIX=" ${green}|"
@ -21,3 +12,9 @@ GIT_THEME_PROMPT_SUFFIX="${green}|"
RVM_THEME_PROMPT_PREFIX="|" RVM_THEME_PROMPT_PREFIX="|"
RVM_THEME_PROMPT_SUFFIX="|" RVM_THEME_PROMPT_SUFFIX="|"
function prompt_command() {
#PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(rvm_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} "
PS1="\n${yellow}$(rvm_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}${reset_color} "
}
PROMPT_COMMAND=prompt_command;

View File

@ -1,2 +1,6 @@
#!/bin/bash #!/bin/bash
PROMPT="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}\[\$(scm_prompt_info)\]${blue}${bold_blue} \$${reset_color} " function prompt_command() {
PS1="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(scm_prompt_info)\]${blue}${bold_blue} ${reset_color} ";
}
PROMPT_COMMAND=prompt_command;

View File

@ -1,9 +1,3 @@
if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
PROMPT="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(scm_prompt_info)\]$ "
RPROMPT='[\t]'
# git theming # git theming
ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B" ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B"
ZSH_THEME_GIT_PROMPT_SUFFIX="%b${bold_blue})${reset_color} " ZSH_THEME_GIT_PROMPT_SUFFIX="%b${bold_blue})${reset_color} "
@ -13,4 +7,14 @@ ZSH_THEME_GIT_PROMPT_DIRTY="${bold_red}✗"
# LS colors, made with http://geoff.greer.fm/lscolors/ # LS colors, made with http://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad" export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
function prompt_command() {
if [ "$(whoami)" = root ]; then no_color=$red; else no_color=$white; fi
PS1="${no_color}\u${reset_color}:${blue}\W/${reset_color} \[\$(scm_prompt_info)\]$ "
RPROMPT='[\t]'
}
PROMPT_COMMAND=prompt_command;

View File

@ -1,44 +1,44 @@
#!/bin/bash #!/bin/bash
black=$'\e[0;30m' black="\[\e[0;30m\]"
red=$'\e[0;31m' red="\[\e[0;31m\]"
green=$'\e[0;32m' green="\[\e[0;32m\]"
yellow=$'\e[0;33m' yellow="\[\e[0;33m\]"
blue=$'\e[0;34m' blue="\[\e[0;34m\]"
purple=$'\e[0;35m' purple="\[\e[0;35m\]"
cyan=$'\e[0;36m' cyan="\[\e[0;36m\]"
white=$'\e[1;37m' white="\[\e[1;37m\]"
orange=$'\e[33;40m' orange="\[\e[33;40m\]"
bold_black=$'\e[1;30m' bold_black="\[\e[1;30m\]"
bold_red=$'\e[1;31m' bold_red="\[\e[1;31m\]"
bold_green=$'\e[1;32m' bold_green="\[\e[1;32m\]"
bold_yellow=$'\e[1;33m' bold_yellow="\[\e[1;33m\]"
bold_blue=$'\e[1;34m' bold_blue="\[\e[1;34m\]"
bold_purple=$'\e[1;35m' bold_purple="\[\e[1;35m\]"
bold_cyan=$'\e[1;36m' bold_cyan="\[\e[1;36m\]"
bold_white=$'\e[1;37m' bold_white="\[\e[1;37m\]"
bold_orange=$'\e[1;33;40m' bold_orange="\[\e[1;33;40m\]"
underline_black=$'\e[4;30m' underline_black="\[\e[4;30m\]"
underline_red=$'\e[4;31m' underline_red="\[\e[4;31m\]"
underline_green=$'\e[4;32m' underline_green="\[\e[4;32m\]"
underline_yellow=$'\e[4;33m' underline_yellow="\[\e[4;33m\]"
underline_blue=$'\e[4;34m' underline_blue="\[\e[4;34m\]"
underline_purple=$'\e[4;35m' underline_purple="\[\e[4;35m\]"
underline_cyan=$'\e[4;36m' underline_cyan="\[\e[4;36m\]"
underline_white=$'\e[4;37m' underline_white="\[\e[4;37m\]"
underline_orange=$'\e[4;33;40m' underline_orange="\[\e[4;33;40m\]"
background_black=$'\e[40m' background_black="\[\e[40m\]"
background_red=$'\e[41m' background_red="\[\e[41m\]"
background_green=$'\e[42m' background_green="\[\e[42m\]"
background_yellow=$'\e[43m' background_yellow="\[\e[43m\]"
background_blue=$'\e[44m' background_blue="\[\e[44m\]"
background_purple=$'\e[45m' background_purple="\[\e[45m\]"
background_cyan=$'\e[46m' background_cyan="\[\e[46m\]"
background_white=$'\e[47m' background_white="\[\e[47m\]"
normal=$'\e[00m' normal="\[\e[00m\]"
reset_color=$'\e[39m' reset_color="\[\e[39m\]"

View File

@ -33,22 +33,22 @@
#*color7: #E5E5E5 #*color7: #E5E5E5
# ----------------------------------------------------------------- COLOR CONF # ----------------------------------------------------------------- COLOR CONF
D_DEFAULT_COLOR='\[${normal}\]' D_DEFAULT_COLOR="${normal}"
D_INTERMEDIATE_COLOR='\[${white}\]' D_INTERMEDIATE_COLOR="${white}"
D_USER_COLOR='\[${purple}\]' D_USER_COLOR="${purple}"
D_SUPERUSER_COLOR='\[${red}\]' D_SUPERUSER_COLOR="${red}"
D_MACHINE_COLOR='\[${cyan}\]' D_MACHINE_COLOR="${cyan}"
D_DIR_COLOR='\[${green}\]' D_DIR_COLOR="${green}"
D_SCM_COLOR='\[${yellow}\]' D_SCM_COLOR="${yellow}"
D_BRANCH_COLOR='\[${yellow}\]' D_BRANCH_COLOR="${yellow}"
D_CHANGES_COLOR='\[${white}\]' D_CHANGES_COLOR="${white}"
D_CMDFAIL_COLOR='\[${red}\]' D_CMDFAIL_COLOR="${red}"
D_VIMSHELL_COLOR='\[${cyan}\]' D_VIMSHELL_COLOR="${cyan}"
# ------------------------------------------------------------------ FUNCTIONS # ------------------------------------------------------------------ FUNCTIONS
case $TERM in case $TERM in
xterm*) xterm*)
TITLEBAR="\[\033]0;\w\007\]" TITLEBAR="\033]0;\w\007"
;; ;;
*) *)
TITLEBAR="" TITLEBAR=""
@ -84,10 +84,10 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
# -------------------------------------------------------------- PROMPT OUTPUT # -------------------------------------------------------------- PROMPT OUTPUT
prompt() { prompt() {
local SAVE_CURSOR='\[\033[s\]' local SAVE_CURSOR='\033[s'
local RESTORE_CURSOR='\[\033[u\]' local RESTORE_CURSOR='\033[u'
local MOVE_CURSOR_RIGHTMOST='\[\033[500C\]' local MOVE_CURSOR_RIGHTMOST='\033[500C'
local MOVE_CURSOR_5_LEFT='\[\033[5D\]' local MOVE_CURSOR_5_LEFT='\033[5D'
if [ $(uname) = "Linux" ]; if [ $(uname) = "Linux" ];
then then

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
SCM_THEME_PROMPT_DIRTY='' SCM_THEME_PROMPT_DIRTY=''
SCM_THEME_PROMPT_CLEAN='' SCM_THEME_PROMPT_CLEAN=''
SCM_GIT_CHAR='${bold_cyan}±${normal}' SCM_GIT_CHAR="${bold_cyan}±${normal}"
SCM_SVN_CHAR='${bold_cyan}⑆${normal}' SCM_SVN_CHAR="${bold_cyan}${normal}"
SCM_HG_CHAR='${bold_red}☿${normal}' SCM_HG_CHAR="${bold_red}${normal}"
SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_PREFIX=""
SCM_THEME_PROMPT_SUFFIX="" SCM_THEME_PROMPT_SUFFIX=""
RVM_THEME_PROMPT_PREFIX=" (" RVM_THEME_PROMPT_PREFIX=" ("
@ -32,7 +32,7 @@ virtualenv_prompt() {
fi fi
} }
prompt_setter() { function prompt_setter() {
# Save history # Save history
history -a history -a
history -c history -c
@ -44,8 +44,8 @@ prompt_setter() {
clock=$THEME_PROMPT_CLOCK_FORMAT clock=$THEME_PROMPT_CLOCK_FORMAT
fi fi
PS1=" PS1="
$clock $(scm_char) [\[$THEME_PROMPT_HOST_COLOR\]\u@${THEME_PROMPT_HOST}\[$reset_color\]] $(virtualenv_prompt)\w $clock $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)\w
$(doubletime_scm_prompt)\[$reset_color\] $ " $(doubletime_scm_prompt)$reset_color $ "
PS2='> ' PS2='> '
PS4='+ ' PS4='+ '
} }

View File

@ -33,22 +33,22 @@
# COLORS ====================================================================== # COLORS ======================================================================
ORANGE='\[\e[0;33m\]' ORANGE='\[\e[0;33m\]'
DEFAULT_COLOR='\[${white}\]' DEFAULT_COLOR="${white}"
USER_COLOR='\[${purple}\]' USER_COLOR="${purple}"
SUPERUSER_COLOR='\[${red}\]' SUPERUSER_COLOR="${red}"
MACHINE_COLOR=$ORANGE MACHINE_COLOR=$ORANGE
IP_COLOR=$ORANGE IP_COLOR=$ORANGE
DIRECTORY_COLOR='\[${green}\]' DIRECTORY_COLOR="${green}"
VE_COLOR='\[${cyan}\]' VE_COLOR="${cyan}"
RVM_COLOR='\[${cyan}\]' RVM_COLOR="${cyan}"
REF_COLOR='\[${purple}\]' REF_COLOR="${purple}"
# SCM prompts # SCM prompts
SCM_THEME_PROMPT_DIRTY=' \[${bold_red}\]✗\[${normal}\]' SCM_THEME_PROMPT_DIRTY=" ${bold_red}${normal}"
SCM_THEME_PROMPT_CLEAN=' \[${bold_green}\]✓\[${normal}\]' SCM_THEME_PROMPT_CLEAN=" ${bold_green}${normal}"
SCM_THEME_PROMPT_PREFIX=' on ' SCM_THEME_PROMPT_PREFIX=' on '
SCM_THEME_PROMPT_SUFFIX='' SCM_THEME_PROMPT_SUFFIX=''
@ -176,9 +176,9 @@ function prompt() {
[ $UID -eq "0" ] && UC=$SUPERUSER_COLOR [ $UID -eq "0" ] && UC=$SUPERUSER_COLOR
if [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then if [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then
PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info) \$ " PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${reset_color} \$ "
else else
PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info) \$ " PS1="$(scm_char) ${UC}\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\h ${DEFAULT_COLOR}(${IP_COLOR}$(ip)${DEFAULT_COLOR}) in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${reset_color} \$ "
fi fi
PS2='> ' PS2='> '
PS4='+ ' PS4='+ '

View File

@ -1,11 +1,11 @@
SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_PREFIX=""
SCM_THEME_PROMPT_SUFFIX="" SCM_THEME_PROMPT_SUFFIX=""
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' SCM_THEME_PROMPT_DIRTY=" ${bold_red}${normal}"
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' SCM_THEME_PROMPT_CLEAN=" ${bold_green}${normal}"
SCM_GIT_CHAR='${bold_green}±${normal}' SCM_GIT_CHAR="${bold_green}±${normal}"
SCM_SVN_CHAR='${bold_cyan}⑆${normal}' SCM_SVN_CHAR="${bold_cyan}${normal}"
SCM_HG_CHAR='${bold_red}☿${normal}' SCM_HG_CHAR="${bold_red}${normal}"
case $TERM in case $TERM in
xterm*) xterm*)

View File

@ -1,11 +1,11 @@
SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_PREFIX=""
SCM_THEME_PROMPT_SUFFIX="" SCM_THEME_PROMPT_SUFFIX=""
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' SCM_THEME_PROMPT_DIRTY=" ${bold_red}${normal}"
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' SCM_THEME_PROMPT_CLEAN=" ${bold_green}${normal}"
SCM_GIT_CHAR='${bold_green}±${normal}' SCM_GIT_CHAR="${bold_green}±${normal}"
SCM_SVN_CHAR='${bold_cyan}⑆${normal}' SCM_SVN_CHAR="${bold_cyan}${normal}"
SCM_HG_CHAR='${bold_red}☿${normal}' SCM_HG_CHAR="${bold_red}${normal}"
case $TERM in case $TERM in
xterm*) xterm*)

View File

@ -5,7 +5,11 @@
# host directory (branch*)» # host directory (branch*)»
# for example: # for example:
# ananas ~/Code/bash-it/themes (master*)» # ananas ~/Code/bash-it/themes (master*)»
PROMPT="${bold_blue}\[\$(hostname)\]${normal} \w${normal} ${bold_white}\[\$(git_prompt_info)\]${normal}» " function prompt_command() {
PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» "
}
PROMPT_COMMAND=prompt_command;
## git-theme ## git-theme
# feel free to change git chars. # feel free to change git chars.

View File

@ -5,7 +5,7 @@ prompt_setter() {
history -a history -a
history -c history -c
history -r history -r
PS1="(\t) $(scm_char) [\[$blue\]\u\[$reset_color\]@\[$green\]\H\[$reset_color\]] \[$yellow\]\w\[$reset_color\]$(scm_prompt_info)$(rvm_version_prompt) $\[$reset_color\] " PS1="(\t) $(scm_char) [$blue\u$reset_color@$green\H$reset_color] $yellow\w${reset_color}$(scm_prompt_info)$(rvm_version_prompt) $reset_color "
PS2='> ' PS2='> '
PS4='+ ' PS4='+ '
} }

View File

@ -0,0 +1,28 @@
#!/bin/bash
# based off of n0qorg
# looks like, if you're in a git repo:
# ± ~/path/to (branch ✓) $
# in glorious red / blue / yellow color scheme
prompt_setter() {
# Save history
history -a
history -c
history -r
# displays user@server in purple
# PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(rvm_version_prompt) $black\$$reset_color "
# no user@server
PS1="$red$(scm_char) $blue\w$yellow$(scm_prompt_info)$(rvm_version_prompt) $black\$$reset_color "
PS2='> '
PS4='+ '
}
PROMPT_COMMAND=prompt_setter
SCM_THEME_PROMPT_DIRTY=" ${red}"
SCM_THEME_PROMPT_CLEAN=" ${green}"
SCM_THEME_PROMPT_PREFIX=" ("
SCM_THEME_PROMPT_SUFFIX="${yellow})"
RVM_THEME_PROMPT_PREFIX=" ("
RVM_THEME_PROMPT_SUFFIX=")"

View File

@ -13,6 +13,10 @@ function rvm_version_prompt {
[ "$full" != "" ] && echo "$full" [ "$full" != "" ] && echo "$full"
} }
function prompt_command() {
# Check http://github.com/Sirupsen/dotfiles for screenshot
PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ "
}
# Check http://github.com/Sirupsen/dotfiles for screenshot PROMPT_COMMAND=prompt_command;
PS1='\[$blue\]\W/\[$bold_blue\]$(rvm_version_prompt)\[$bold_green\]$(__git_ps1 " (%s)") \[${normal}\]$ '

View File

@ -1,7 +1,3 @@
PROMPT='\[${green}\]\u\[${normal}\]@\[${green}\]\h\[${normal}\]:\[${blue}\]\w\[${normal}\]\[${red}\]$(prompt_char)$(git_prompt_info)\[${normal}\]\$ '
# scm themeing # scm themeing
SCM_THEME_PROMPT_DIRTY="×" SCM_THEME_PROMPT_DIRTY="×"
SCM_THEME_PROMPT_CLEAN="✓" SCM_THEME_PROMPT_CLEAN="✓"
@ -19,4 +15,10 @@ case $TERM in
*) *)
TITLEBAR="" TITLEBAR=""
;; ;;
esac esac
function prompt_command() {
PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ '
}
PROMPT_COMMAND=prompt_command;

View File

@ -1,12 +1,6 @@
#!/bin/bash #!/bin/bash
# zitron theme by Florian Baumann <flo@noqqe.de> # zitron theme by Florian Baumann <flo@noqqe.de>
## look-a-like
# user:host:pwd git-branch(*)$
# for example:
# noqqe:deathstar:themes master*$
PROMPT="${no_color}\u:\[\$(hostname)\]${normal}:${bold_yellow}\W/${normal} \[\$(git_prompt_info)\]${reset_color}$ "
## git-theme ## git-theme
# feel free to change git chars. # feel free to change git chars.
GIT_THEME_PROMPT_DIRTY="${bold_yellow}*${normal}" GIT_THEME_PROMPT_DIRTY="${bold_yellow}*${normal}"
@ -18,3 +12,13 @@ GIT_THEME_PROMPT_SUFFIX=""
# thanks a lot to http://geoff.greer.fm/lscolors/ # thanks a lot to http://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad" export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS="no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;34:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:" export LS_COLORS="no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;34:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:"
function prompt_command() {
## look-a-like
# user:host:pwd git-branch(*)$
# for example:
# noqqe:deathstar:themes master*$
PS1="${no_color}\u:$(hostname)${normal}:${bold_yellow}\W/${normal} $(git_prompt_info)${reset_color}$ "
}
PROMPT_COMMAND=prompt_command;

View File

@ -1,11 +1,11 @@
SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_PREFIX=""
SCM_THEME_PROMPT_SUFFIX="" SCM_THEME_PROMPT_SUFFIX=""
SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' SCM_THEME_PROMPT_DIRTY=" ${bold_red}${normal}"
SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' SCM_THEME_PROMPT_CLEAN=" ${bold_green}${normal}"
SCM_GIT_CHAR='${bold_green}±${normal}' SCM_GIT_CHAR="${bold_green}±${normal}"
SCM_SVN_CHAR='${bold_cyan}⑆${normal}' SCM_SVN_CHAR="${bold_cyan}${normal}"
SCM_HG_CHAR='${bold_red}☿${normal}' SCM_HG_CHAR="${bold_red}${normal}"
#Mysql Prompt #Mysql Prompt
export MYSQL_PS1="(\u@\h) [\d]> " export MYSQL_PS1="(\u@\h) [\d]> "