diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index 79bd7aa0..2ed9d134 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -46,6 +46,15 @@ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" alias md='mkdir -p' 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() { echo "Generic Alias Usage" echo diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index 45d7d05f..7cfc9d93 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -39,8 +39,6 @@ case $OSTYPE in ;; esac - - function git-help() { echo "Git Custom Aliases Usage" echo diff --git a/aliases/available/jekyll.aliases.bash b/aliases/available/jekyll.aliases.bash index e52c0351..feaf245a 100644 --- a/aliases/available/jekyll.aliases.bash +++ b/aliases/available/jekyll.aliases.bash @@ -18,3 +18,6 @@ alias buildsite="builtin cd $JEKYLL_LOCAL_ROOT && rm -rf _site/ && jekyll" # Rsync the site to the remote server alias deploysite="builtin cd $JEKYLL_LOCAL_ROOT && rsync -rz _site/ $JEKYLL_REMOTE_ROOT" + +alias jkas="jekyll --auto --server" +alias rmjkas="rm -rf _site/* && jkas" \ No newline at end of file diff --git a/aliases/available/osx.aliases.bash b/aliases/available/osx.aliases.bash index e0746952..d25c0511 100644 --- a/aliases/available/osx.aliases.bash +++ b/aliases/available/osx.aliases.bash @@ -14,6 +14,7 @@ alias dashcode="open -a dashcode" alias f='open -a Finder ' alias textedit='open -a TextEdit' alias hex='open -a "Hex Fiend"' +alias gitx="open -a GitX" if [ -s /usr/bin/firefox ] ; then unalias firefox diff --git a/plugins/available/battery.plugin.bash b/plugins/available/battery.plugin.bash index 4946c2c9..7c158122 100644 --- a/plugins/available/battery.plugin.bash +++ b/plugins/available/battery.plugin.bash @@ -69,11 +69,11 @@ battery_charge(){ local F_C='▸' # Depleted char local D_C='▹' - local DEPLETED_COLOR='\[${normal}\]' - local FULL_COLOR='\[${green}\]' - local HALF_COLOR='\[${yellow}\]' - local DANGER_COLOR='\[${red}\]' - local BATTERY_OUTPUT='${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}' + local DEPLETED_COLOR="${normal}" + local FULL_COLOR="${green}" + local HALF_COLOR="${yellow}" + local DANGER_COLOR="${red}" + local BATTERY_OUTPUT="${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}" local BATTERY_PERC=$(battery_percentage) 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 "${DANGER_COLOR}UNPLG\[${normal}\]" + echo "${DANGER_COLOR}UNPLG${normal}" ;; esac } diff --git a/plugins/available/git.plugins.bash b/plugins/available/git.plugins.bash index b0b9ce8c..3fbdac61 100644 --- a/plugins/available/git.plugins.bash +++ b/plugins/available/git.plugins.bash @@ -5,6 +5,13 @@ function git_remote { 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 { echo "Running: 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" fi } - diff --git a/plugins/available/jekyll.plugins.bash b/plugins/available/jekyll.plugins.bash index aebe69bc..3b96f451 100644 --- a/plugins/available/jekyll.plugins.bash +++ b/plugins/available/jekyll.plugins.bash @@ -26,7 +26,7 @@ editpost() { fi } -newpost() { +jknewpost() { # 'builtin cd' into the local jekyll root diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 71b11aeb..bd29a424 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -15,7 +15,7 @@ SCM_HG_CHAR='☿' SVN='svn' SCM_SVN_CHAR='⑆' -SCM_NONE_CHAR='○' +SCM_NONE_CHAR='·' RVM_THEME_PROMPT_PREFIX=' |' RVM_THEME_PROMPT_SUFFIX='|' diff --git a/themes/bobby/bobby.theme.bash b/themes/bobby/bobby.theme.bash index 8b48ddd9..cb51fb85 100644 --- a/themes/bobby/bobby.theme.bash +++ b/themes/bobby/bobby.theme.bash @@ -4,15 +4,6 @@ SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" SCM_THEME_PROMPT_PREFIX=" |" 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_CLEAN=" ${bold_green}✓" GIT_THEME_PROMPT_PREFIX=" ${green}|" @@ -21,3 +12,9 @@ GIT_THEME_PROMPT_SUFFIX="${green}|" RVM_THEME_PROMPT_PREFIX="|" 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; diff --git a/themes/candy/candy.theme.bash b/themes/candy/candy.theme.bash index ef0ba262..64d31b83 100644 --- a/themes/candy/candy.theme.bash +++ b/themes/candy/candy.theme.bash @@ -1,2 +1,6 @@ #!/bin/bash -PROMPT="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}\[\$(scm_prompt_info)\]${blue} →${bold_blue} \$${reset_color} " \ No newline at end of file +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; diff --git a/themes/clean/clean.theme.bash b/themes/clean/clean.theme.bash index 2fc418f8..9998d65e 100644 --- a/themes/clean/clean.theme.bash +++ b/themes/clean/clean.theme.bash @@ -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 ZSH_THEME_GIT_PROMPT_PREFIX="${bold_blue}(${yellow}%B" 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/ 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:' \ No newline at end of file +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; diff --git a/themes/colors.theme.bash b/themes/colors.theme.bash index 9aa253f5..ff8776d2 100644 --- a/themes/colors.theme.bash +++ b/themes/colors.theme.bash @@ -1,44 +1,44 @@ #!/bin/bash -black=$'\e[0;30m' -red=$'\e[0;31m' -green=$'\e[0;32m' -yellow=$'\e[0;33m' -blue=$'\e[0;34m' -purple=$'\e[0;35m' -cyan=$'\e[0;36m' -white=$'\e[1;37m' -orange=$'\e[33;40m' +black="\[\e[0;30m\]" +red="\[\e[0;31m\]" +green="\[\e[0;32m\]" +yellow="\[\e[0;33m\]" +blue="\[\e[0;34m\]" +purple="\[\e[0;35m\]" +cyan="\[\e[0;36m\]" +white="\[\e[1;37m\]" +orange="\[\e[33;40m\]" -bold_black=$'\e[1;30m' -bold_red=$'\e[1;31m' -bold_green=$'\e[1;32m' -bold_yellow=$'\e[1;33m' -bold_blue=$'\e[1;34m' -bold_purple=$'\e[1;35m' -bold_cyan=$'\e[1;36m' -bold_white=$'\e[1;37m' -bold_orange=$'\e[1;33;40m' +bold_black="\[\e[1;30m\]" +bold_red="\[\e[1;31m\]" +bold_green="\[\e[1;32m\]" +bold_yellow="\[\e[1;33m\]" +bold_blue="\[\e[1;34m\]" +bold_purple="\[\e[1;35m\]" +bold_cyan="\[\e[1;36m\]" +bold_white="\[\e[1;37m\]" +bold_orange="\[\e[1;33;40m\]" -underline_black=$'\e[4;30m' -underline_red=$'\e[4;31m' -underline_green=$'\e[4;32m' -underline_yellow=$'\e[4;33m' -underline_blue=$'\e[4;34m' -underline_purple=$'\e[4;35m' -underline_cyan=$'\e[4;36m' -underline_white=$'\e[4;37m' -underline_orange=$'\e[4;33;40m' +underline_black="\[\e[4;30m\]" +underline_red="\[\e[4;31m\]" +underline_green="\[\e[4;32m\]" +underline_yellow="\[\e[4;33m\]" +underline_blue="\[\e[4;34m\]" +underline_purple="\[\e[4;35m\]" +underline_cyan="\[\e[4;36m\]" +underline_white="\[\e[4;37m\]" +underline_orange="\[\e[4;33;40m\]" -background_black=$'\e[40m' -background_red=$'\e[41m' -background_green=$'\e[42m' -background_yellow=$'\e[43m' -background_blue=$'\e[44m' -background_purple=$'\e[45m' -background_cyan=$'\e[46m' -background_white=$'\e[47m' +background_black="\[\e[40m\]" +background_red="\[\e[41m\]" +background_green="\[\e[42m\]" +background_yellow="\[\e[43m\]" +background_blue="\[\e[44m\]" +background_purple="\[\e[45m\]" +background_cyan="\[\e[46m\]" +background_white="\[\e[47m\]" -normal=$'\e[00m' -reset_color=$'\e[39m' \ No newline at end of file +normal="\[\e[00m\]" +reset_color="\[\e[39m\]" diff --git a/themes/demula/demula.theme.bash b/themes/demula/demula.theme.bash index 0e6744a4..bd48e12c 100644 --- a/themes/demula/demula.theme.bash +++ b/themes/demula/demula.theme.bash @@ -33,22 +33,22 @@ #*color7: #E5E5E5 # ----------------------------------------------------------------- COLOR CONF -D_DEFAULT_COLOR='\[${normal}\]' -D_INTERMEDIATE_COLOR='\[${white}\]' -D_USER_COLOR='\[${purple}\]' -D_SUPERUSER_COLOR='\[${red}\]' -D_MACHINE_COLOR='\[${cyan}\]' -D_DIR_COLOR='\[${green}\]' -D_SCM_COLOR='\[${yellow}\]' -D_BRANCH_COLOR='\[${yellow}\]' -D_CHANGES_COLOR='\[${white}\]' -D_CMDFAIL_COLOR='\[${red}\]' -D_VIMSHELL_COLOR='\[${cyan}\]' +D_DEFAULT_COLOR="${normal}" +D_INTERMEDIATE_COLOR="${white}" +D_USER_COLOR="${purple}" +D_SUPERUSER_COLOR="${red}" +D_MACHINE_COLOR="${cyan}" +D_DIR_COLOR="${green}" +D_SCM_COLOR="${yellow}" +D_BRANCH_COLOR="${yellow}" +D_CHANGES_COLOR="${white}" +D_CMDFAIL_COLOR="${red}" +D_VIMSHELL_COLOR="${cyan}" # ------------------------------------------------------------------ FUNCTIONS case $TERM in xterm*) - TITLEBAR="\[\033]0;\w\007\]" + TITLEBAR="\033]0;\w\007" ;; *) TITLEBAR="" @@ -84,10 +84,10 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}" # -------------------------------------------------------------- PROMPT OUTPUT prompt() { - local SAVE_CURSOR='\[\033[s\]' - local RESTORE_CURSOR='\[\033[u\]' - local MOVE_CURSOR_RIGHTMOST='\[\033[500C\]' - local MOVE_CURSOR_5_LEFT='\[\033[5D\]' + local SAVE_CURSOR='\033[s' + local RESTORE_CURSOR='\033[u' + local MOVE_CURSOR_RIGHTMOST='\033[500C' + local MOVE_CURSOR_5_LEFT='\033[5D' if [ $(uname) = "Linux" ]; then diff --git a/themes/doubletime/doubletime.theme.bash b/themes/doubletime/doubletime.theme.bash index 91844f0e..1237f80f 100644 --- a/themes/doubletime/doubletime.theme.bash +++ b/themes/doubletime/doubletime.theme.bash @@ -1,9 +1,9 @@ #!/bin/bash SCM_THEME_PROMPT_DIRTY='' SCM_THEME_PROMPT_CLEAN='' -SCM_GIT_CHAR='${bold_cyan}±${normal}' -SCM_SVN_CHAR='${bold_cyan}⑆${normal}' -SCM_HG_CHAR='${bold_red}☿${normal}' +SCM_GIT_CHAR="${bold_cyan}±${normal}" +SCM_SVN_CHAR="${bold_cyan}⑆${normal}" +SCM_HG_CHAR="${bold_red}☿${normal}" SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" RVM_THEME_PROMPT_PREFIX=" (" @@ -32,7 +32,7 @@ virtualenv_prompt() { fi } -prompt_setter() { +function prompt_setter() { # Save history history -a history -c @@ -44,8 +44,8 @@ prompt_setter() { clock=$THEME_PROMPT_CLOCK_FORMAT fi PS1=" -$clock $(scm_char) [\[$THEME_PROMPT_HOST_COLOR\]\u@${THEME_PROMPT_HOST}\[$reset_color\]] $(virtualenv_prompt)\w -$(doubletime_scm_prompt)\[$reset_color\] $ " +$clock $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)\w +$(doubletime_scm_prompt)$reset_color $ " PS2='> ' PS4='+ ' } diff --git a/themes/hawaii50/hawaii50.theme.bash b/themes/hawaii50/hawaii50.theme.bash index ad87e787..21c0b413 100644 --- a/themes/hawaii50/hawaii50.theme.bash +++ b/themes/hawaii50/hawaii50.theme.bash @@ -33,22 +33,22 @@ # COLORS ====================================================================== ORANGE='\[\e[0;33m\]' -DEFAULT_COLOR='\[${white}\]' +DEFAULT_COLOR="${white}" -USER_COLOR='\[${purple}\]' -SUPERUSER_COLOR='\[${red}\]' +USER_COLOR="${purple}" +SUPERUSER_COLOR="${red}" MACHINE_COLOR=$ORANGE IP_COLOR=$ORANGE -DIRECTORY_COLOR='\[${green}\]' +DIRECTORY_COLOR="${green}" -VE_COLOR='\[${cyan}\]' -RVM_COLOR='\[${cyan}\]' +VE_COLOR="${cyan}" +RVM_COLOR="${cyan}" -REF_COLOR='\[${purple}\]' +REF_COLOR="${purple}" # SCM prompts -SCM_THEME_PROMPT_DIRTY=' \[${bold_red}\]✗\[${normal}\]' -SCM_THEME_PROMPT_CLEAN=' \[${bold_green}\]✓\[${normal}\]' +SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" SCM_THEME_PROMPT_PREFIX=' on ' SCM_THEME_PROMPT_SUFFIX='' @@ -176,9 +176,9 @@ function prompt() { [ $UID -eq "0" ] && UC=$SUPERUSER_COLOR 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 - 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 PS2='> ' PS4='+ ' diff --git a/themes/modern-t/modern-t.theme.bash b/themes/modern-t/modern-t.theme.bash index 55da6e14..12e5b041 100644 --- a/themes/modern-t/modern-t.theme.bash +++ b/themes/modern-t/modern-t.theme.bash @@ -1,11 +1,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' -SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' -SCM_GIT_CHAR='${bold_green}±${normal}' -SCM_SVN_CHAR='${bold_cyan}⑆${normal}' -SCM_HG_CHAR='${bold_red}☿${normal}' +SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_GIT_CHAR="${bold_green}±${normal}" +SCM_SVN_CHAR="${bold_cyan}⑆${normal}" +SCM_HG_CHAR="${bold_red}☿${normal}" case $TERM in xterm*) diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash index 3efe9ffe..32c7cabb 100644 --- a/themes/modern/modern.theme.bash +++ b/themes/modern/modern.theme.bash @@ -1,11 +1,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' -SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' -SCM_GIT_CHAR='${bold_green}±${normal}' -SCM_SVN_CHAR='${bold_cyan}⑆${normal}' -SCM_HG_CHAR='${bold_red}☿${normal}' +SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_GIT_CHAR="${bold_green}±${normal}" +SCM_SVN_CHAR="${bold_cyan}⑆${normal}" +SCM_HG_CHAR="${bold_red}☿${normal}" case $TERM in xterm*) diff --git a/themes/n0qorg/n0qorg.theme.bash b/themes/n0qorg/n0qorg.theme.bash index fcaca43f..2b9def6c 100644 --- a/themes/n0qorg/n0qorg.theme.bash +++ b/themes/n0qorg/n0qorg.theme.bash @@ -5,7 +5,11 @@ # host directory (branch*)» # for example: # 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 # feel free to change git chars. diff --git a/themes/pete/pete.theme.bash b/themes/pete/pete.theme.bash index 95f243af..7b6702cf 100644 --- a/themes/pete/pete.theme.bash +++ b/themes/pete/pete.theme.bash @@ -5,7 +5,7 @@ prompt_setter() { history -a history -c 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='> ' PS4='+ ' } diff --git a/themes/rainbowbrite/rainbowbrite.theme.bash b/themes/rainbowbrite/rainbowbrite.theme.bash new file mode 100644 index 00000000..5f91705c --- /dev/null +++ b/themes/rainbowbrite/rainbowbrite.theme.bash @@ -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=")" diff --git a/themes/sirup/sirup.theme.bash b/themes/sirup/sirup.theme.bash index 50665871..146cc356 100644 --- a/themes/sirup/sirup.theme.bash +++ b/themes/sirup/sirup.theme.bash @@ -13,6 +13,10 @@ function rvm_version_prompt { [ "$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 -PS1='\[$blue\]\W/\[$bold_blue\]$(rvm_version_prompt)\[$bold_green\]$(__git_ps1 " (%s)") \[${normal}\]$ ' +PROMPT_COMMAND=prompt_command; diff --git a/themes/standard/standard.theme.bash b/themes/standard/standard.theme.bash index 5ba288c1..87402c73 100644 --- a/themes/standard/standard.theme.bash +++ b/themes/standard/standard.theme.bash @@ -1,7 +1,3 @@ -PROMPT='\[${green}\]\u\[${normal}\]@\[${green}\]\h\[${normal}\]:\[${blue}\]\w\[${normal}\]\[${red}\]$(prompt_char)$(git_prompt_info)\[${normal}\]\$ ' - - - # scm themeing SCM_THEME_PROMPT_DIRTY="×" SCM_THEME_PROMPT_CLEAN="✓" @@ -19,4 +15,10 @@ case $TERM in *) TITLEBAR="" ;; -esac \ No newline at end of file +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; diff --git a/themes/zitron/zitron.theme.bash b/themes/zitron/zitron.theme.bash index c0726865..3ec4d97a 100644 --- a/themes/zitron/zitron.theme.bash +++ b/themes/zitron/zitron.theme.bash @@ -1,12 +1,6 @@ #!/bin/bash # zitron theme by Florian Baumann -## 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 # feel free to change git chars. GIT_THEME_PROMPT_DIRTY="${bold_yellow}*${normal}" @@ -18,3 +12,13 @@ GIT_THEME_PROMPT_SUFFIX="" # thanks a lot to http://geoff.greer.fm/lscolors/ 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:" + +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; diff --git a/themes/zork/zork.theme.bash b/themes/zork/zork.theme.bash index 54615d78..f541c0d9 100644 --- a/themes/zork/zork.theme.bash +++ b/themes/zork/zork.theme.bash @@ -1,11 +1,11 @@ SCM_THEME_PROMPT_PREFIX="" SCM_THEME_PROMPT_SUFFIX="" -SCM_THEME_PROMPT_DIRTY=' ${bold_red}✗${normal}' -SCM_THEME_PROMPT_CLEAN=' ${bold_green}✓${normal}' -SCM_GIT_CHAR='${bold_green}±${normal}' -SCM_SVN_CHAR='${bold_cyan}⑆${normal}' -SCM_HG_CHAR='${bold_red}☿${normal}' +SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" +SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" +SCM_GIT_CHAR="${bold_green}±${normal}" +SCM_SVN_CHAR="${bold_cyan}⑆${normal}" +SCM_HG_CHAR="${bold_red}☿${normal}" #Mysql Prompt export MYSQL_PS1="(\u@\h) [\d]> "