summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MIT-LICENSE.txt21
-rw-r--r--lib/git.zsh16
-rw-r--r--lib/history.zsh4
-rw-r--r--lib/termsupport.zsh2
-rw-r--r--plugins/bundler/bundler.plugin.zsh1
-rw-r--r--plugins/capistrano/_capistrano2
-rw-r--r--plugins/encode64/encode64.plugin.zsh4
-rw-r--r--plugins/golang/golang.plugin.zsh150
-rwxr-xr-xplugins/grails/grails.plugin.zsh28
-rw-r--r--plugins/lein/lein.plugin.zsh14
-rw-r--r--plugins/osx/osx.plugin.zsh3
-rw-r--r--plugins/pj/pj.plugin.zsh42
-rw-r--r--plugins/rbenv/rbenv.plugin.zsh12
-rw-r--r--plugins/sprunge/sprunge.plugin.zsh4
-rw-r--r--plugins/ssh-agent/ssh-agent.plugin.zsh15
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh17
-rw-r--r--plugins/zeus/README.md2
-rw-r--r--plugins/zeus/zeus.plugin.zsh5
-rw-r--r--themes/agnoster.zsh-theme2
-rw-r--r--themes/blinks.zsh-theme16
-rw-r--r--themes/michelebologna.zsh-theme44
21 files changed, 353 insertions, 51 deletions
diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt
new file mode 100644
index 000000000..f6edab65b
--- /dev/null
+++ b/MIT-LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2009-2013 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/lib/git.zsh b/lib/git.zsh
index b1dfce357..3e14695bd 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -9,13 +9,15 @@ function git_prompt_info() {
# Checks if working tree is dirty
parse_git_dirty() {
local SUBMODULE_SYNTAX=''
- if [[ $POST_1_7_2_GIT -gt 0 ]]; then
- SUBMODULE_SYNTAX="--ignore-submodules=dirty"
- fi
- if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
- echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
- else
- echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
+ if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
+ if [[ $POST_1_7_2_GIT -gt 0 ]]; then
+ SUBMODULE_SYNTAX="--ignore-submodules=dirty"
+ fi
+ if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
+ echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
+ else
+ echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
+ fi
fi
}
diff --git a/lib/history.zsh b/lib/history.zsh
index 876936b87..655945166 100644
--- a/lib/history.zsh
+++ b/lib/history.zsh
@@ -1,5 +1,7 @@
## Command history configuration
-HISTFILE=$HOME/.zsh_history
+if [ -z $HISTFILE ]; then
+ HISTFILE=$HOME/.zsh_history
+fi
HISTSIZE=10000
SAVEHIST=10000
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 7470110b6..c056989eb 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -8,8 +8,6 @@ function title {
fi
if [[ "$TERM" == screen* ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
- elif [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then
- print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
print -Pn "\e]2;$2:q\a" #set window name
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index f9843696b..10c221acd 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -33,6 +33,7 @@ _run-with-bundler() {
## Main program
for cmd in $bundled_commands; do
+ eval "function unbundled_$cmd () { $cmd \$@ }"
eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
alias $cmd=bundled_$cmd
diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano
index cf6b50c7f..1002dad96 100644
--- a/plugins/capistrano/_capistrano
+++ b/plugins/capistrano/_capistrano
@@ -1,7 +1,7 @@
#compdef cap
#autoload
-if [ -f config/deploy.rb ]; then
+if [[ -f config/deploy.rb || -f Capfile ]]; then
if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
echo "\nGenerating .cap_tasks~..." > /dev/stderr
cap --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
diff --git a/plugins/encode64/encode64.plugin.zsh b/plugins/encode64/encode64.plugin.zsh
index cfb7c6a18..3b59447c5 100644
--- a/plugins/encode64/encode64.plugin.zsh
+++ b/plugins/encode64/encode64.plugin.zsh
@@ -1,2 +1,4 @@
encode64(){ echo -n $1 | base64 }
-decode64(){ echo -n $1 | base64 -D } \ No newline at end of file
+decode64(){ echo -n $1 | base64 -D }
+alias e64=encode64
+alias d64=decode64
diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
new file mode 100644
index 000000000..e60c4afe4
--- /dev/null
+++ b/plugins/golang/golang.plugin.zsh
@@ -0,0 +1,150 @@
+# From : http://golang.org/misc/zsh/go?m=text
+# gc
+prefixes=(5 6 8)
+for p in $prefixes; do
+ compctl -g "*.${p}" ${p}l
+ compctl -g "*.go" ${p}g
+done
+
+# standard go tools
+compctl -g "*.go" gofmt
+
+# gccgo
+compctl -g "*.go" gccgo
+
+# go tool
+__go_tool_complete() {
+ typeset -a commands build_flags
+ commands+=(
+ 'build[compile packages and dependencies]'
+ 'clean[remove object files]'
+ 'doc[run godoc on package sources]'
+ 'fix[run go tool fix on packages]'
+ 'fmt[run gofmt on package sources]'
+ 'get[download and install packages and dependencies]'
+ 'help[display help]'
+ 'install[compile and install packages and dependencies]'
+ 'list[list packages]'
+ 'run[compile and run Go program]'
+ 'test[test packages]'
+ 'tool[run specified go tool]'
+ 'version[print Go version]'
+ 'vet[run go tool vet on packages]'
+ )
+ if (( CURRENT == 2 )); then
+ # explain go commands
+ _values 'go tool commands' ${commands[@]}
+ return
+ fi
+ build_flags=(
+ '-a[force reinstallation of packages that are already up-to-date]'
+ '-n[print the commands but do not run them]'
+ "-p[number of parallel builds]:number"
+ '-x[print the commands]'
+ "-work[print temporary directory name and keep it]"
+ "-gcflags[flags for 5g/6g/8g]:flags"
+ "-ldflags[flags for 5l/6l/8l]:flags"
+ "-gccgoflags[flags for gccgo]:flags"
+ )
+ __go_list() {
+ local expl importpaths
+ declare -a importpaths
+ importpaths=($(go list ${words[$CURRENT]}... 2>/dev/null))
+ _wanted importpaths expl 'import paths' compadd "$@" - "${importpaths[@]}"
+ }
+ case ${words[2]} in
+ clean|doc)
+ _arguments -s -w : '*:importpaths:__go_list'
+ ;;
+ fix|fmt|list|vet)
+ _alternative ':importpaths:__go_list' ':files:_path_files -g "*.go"'
+ ;;
+ install)
+ _arguments -s -w : ${build_flags[@]} \
+ "-v[show package names]" \
+ '*:importpaths:__go_list'
+ ;;
+ get)
+ _arguments -s -w : \
+ ${build_flags[@]}
+ ;;
+ build)
+ _arguments -s -w : \
+ ${build_flags[@]} \
+ "-v[show package names]" \
+ "-o[output file]:file:_files" \
+ "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
+ ;;
+ test)
+ _arguments -s -w : \
+ ${build_flags[@]} \
+ "-c[do not run, compile the test binary]" \
+ "-i[do not run, install dependencies]" \
+ "-v[print test output]" \
+ "-x[print the commands]" \
+ "-short[use short mode]" \
+ "-parallel[number of parallel tests]:number" \
+ "-cpu[values of GOMAXPROCS to use]:number list" \
+ "-run[run tests and examples matching regexp]:regexp" \
+ "-bench[run benchmarks matching regexp]:regexp" \
+ "-benchtime[run each benchmark during n seconds]:duration" \
+ "-timeout[kill test after that duration]:duration" \
+ "-cpuprofile[write CPU profile to file]:file:_files" \
+ "-memprofile[write heap profile to file]:file:_files" \
+ "-memprofilerate[set heap profiling rate]:number" \
+ "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
+ ;;
+ help)
+ _values "${commands[@]}" \
+ 'gopath[GOPATH environment variable]' \
+ 'importpath[description of import paths]' \
+ 'remote[remote import path syntax]' \
+ 'testflag[description of testing flags]' \
+ 'testfunc[description of testing functions]'
+ ;;
+ run)
+ _arguments -s -w : \
+ ${build_flags[@]} \
+ '*:file:_path_files -g "*.go"'
+ ;;
+ tool)
+ if (( CURRENT == 3 )); then
+ _values "go tool" $(go tool)
+ return
+ fi
+ case ${words[3]} in
+ [568]g)
+ _arguments -s -w : \
+ '-I[search for packages in DIR]:includes:_path_files -/' \
+ '-L[show full path in file:line prints]' \
+ '-S[print the assembly language]' \
+ '-V[print the compiler version]' \
+ '-e[no limit on number of errors printed]' \
+ '-h[panic on an error]' \
+ '-l[disable inlining]' \
+ '-m[print optimization decisions]' \
+ '-o[file specify output file]:file' \
+ '-p[assumed import path for this code]:importpath' \
+ '-u[disable package unsafe]' \
+ "*:file:_files -g '*.go'"
+ ;;
+ [568]l)
+ local O=${words[3]%l}
+ _arguments -s -w : \
+ '-o[file specify output file]:file' \
+ '-L[search for packages in DIR]:includes:_path_files -/' \
+ "*:file:_files -g '*.[ao$O]'"
+ ;;
+ dist)
+ _values "dist tool" banner bootstrap clean env install version
+ ;;
+ *)
+ # use files by default
+ _files
+ ;;
+ esac
+ ;;
+ esac
+}
+
+compdef __go_tool_complete go \ No newline at end of file
diff --git a/plugins/grails/grails.plugin.zsh b/plugins/grails/grails.plugin.zsh
index cc6f9c53b..11777738c 100755
--- a/plugins/grails/grails.plugin.zsh
+++ b/plugins/grails/grails.plugin.zsh
@@ -24,17 +24,23 @@ _enumerateGrailsScripts() {
return
fi
- # - Strip the path
- # - Remove all scripts with a leading '_'
- # - PackagePlugin_.groovy -> PackagePlugin
- # - PackagePlugin -> Package-Plugin
- # - Package-Plugin -> package-plugin
- basename $files \
- | sed -E -e 's/^_?([^_]+)_?.groovy/\1/'\
- -e 's/([a-z])([A-Z])/\1-\2/g' \
- | tr "[:upper:]" "[:lower:]" \
- | sort \
- | uniq
+ scripts=()
+ for file in $files
+ do
+ # - Strip the path
+ # - Remove all scripts with a leading '_'
+ # - PackagePlugin_.groovy -> PackagePlugin
+ # - PackagePlugin -> Package-Plugin
+ # - Package-Plugin -> package-plugin
+ command=$(basename $file \
+ | sed -E -e 's/^_?([^_]+)_?.groovy/\1/'\
+ -e 's/([a-z])([A-Z])/\1-\2/g' \
+ | tr "[:upper:]" "[:lower:]" \
+ | sort \
+ | uniq)
+ scripts+=($command)
+ done
+ echo $scripts
}
_grails() {
diff --git a/plugins/lein/lein.plugin.zsh b/plugins/lein/lein.plugin.zsh
index 19af3556a..11c92979b 100644
--- a/plugins/lein/lein.plugin.zsh
+++ b/plugins/lein/lein.plugin.zsh
@@ -5,15 +5,29 @@ function _lein_commands() {
case $state in
subcommand)
subcommands=(
+ "classpath:print the classpath of the current project"
"clean:remove compiled files and dependencies from project"
"compile:ahead-of-time compile the project"
+ "deploy:build jar and deploy to remote repository"
"deps:download and install all dependencies"
"help:display a list of tasks or help for a given task"
"install:install the project and its dependencies in your local repository"
+ "int:enter an interactive task shell"
+ "interactive:enter an interactive task shell"
+ "jack-in:jack in to a clojure slime session from emacs."
"jar:create a jar file containing the compiled .class files"
+ "javac:compile java source files"
"new:create a new project skeleton"
+ "plugin:manage user-level plugins"
"pom:write a pom.xml file to disk for maven interop"
+ "repl:start a repl session either with the current project or standalone"
+ "retest:run only the test namespaces which failed last time around"
+ "run:run the project's -main function"
+ "search:search remote maven repositories for matching jars"
+ "swank:launch swank server for Emacs to connect"
"test:run the project's tests"
+ "test!:run a project's tests after cleaning and fetching dependencies"
+ "trampoline:run a task without nesting the project's JVM inside Leiningen's."
"uberjar:Create a jar including the contents of each of deps"
"upgrade:upgrade leiningen to the latest stable release"
"version:print leiningen's version"
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index f278d4f8d..51cd7c143 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -154,3 +154,6 @@ function trash() {
IFS=$temp_ifs
}
+function vncviewer() {
+ open vnc://$@
+}
diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh
new file mode 100644
index 000000000..ba3765b83
--- /dev/null
+++ b/plugins/pj/pj.plugin.zsh
@@ -0,0 +1,42 @@
+#!/bin/zsh
+
+#
+# Original idea by DefV (Jan De Poorter)
+# Source: https://gist.github.com/pjaspers/368394#comment-1016
+#
+# Usage:
+# - Set `$PROJECT_PATHS` in your ~/.zshrc
+# e.g.: PROJECT_PATHS=(~/src ~/work)
+# - In ZSH you now can open a project directory with the command: `pj my-project`
+# the plugin will locate the `my-project` directory in one of the $PROJECT_PATHS
+# Also tab completion is supported.
+# - `pjo my-project` will open the directory in $EDITOR
+#
+
+function pj() {
+ cmd="cd"
+ file=$1
+
+ if [[ "open" == "$file" ]] then
+ file=$2
+ cmd=(${(s: :)EDITOR})
+ fi
+
+ for project in $PROJECT_PATHS; do
+ if [[ -d $project/$file ]] then
+ $cmd "$project/$file"
+ unset project # Unset project var
+ return
+ fi
+ done
+
+ echo "No such project $1"
+}
+
+alias pjo="pj open"
+
+function _pj () {
+ compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'`
+}
+
+compdef _pj pj
diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
index d855c2445..78f76c3a3 100644
--- a/plugins/rbenv/rbenv.plugin.zsh
+++ b/plugins/rbenv/rbenv.plugin.zsh
@@ -17,7 +17,7 @@ for rbenvdir in "${rbenvdirs[@]}" ; do
FOUND_RBENV=1
export RBENV_ROOT=$rbenvdir
export PATH=${rbenvdir}/bin:$PATH
- eval "$(rbenv init - zsh)"
+ eval "$(rbenv init --no-rehash - zsh)"
alias rubies="rbenv versions"
alias gemsets="rbenv gemset list"
@@ -32,11 +32,11 @@ for rbenvdir in "${rbenvdirs[@]}" ; do
function gems {
local rbenv_path=$(rbenv prefix)
- gem list $@ | sed \
- -Ee "s/\([0-9\.]+( .+)?\)/$fg[blue]&$reset_color/g" \
- -Ee "s|$(echo $rbenv_path)|$fg[magenta]\$rbenv_path$reset_color|g" \
- -Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
- -Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
+ gem list $@ | sed -E \
+ -e "s/\([0-9a-z, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
+ -e "s|$(echo $rbenv_path)|$fg[magenta]\$rbenv_path$reset_color|g" \
+ -e "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
+ -e "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
}
function rbenv_prompt_info() {
diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh
index 9f9432ac8..fcc9004f8 100644
--- a/plugins/sprunge/sprunge.plugin.zsh
+++ b/plugins/sprunge/sprunge.plugin.zsh
@@ -57,8 +57,6 @@ sprunge() {
fi
else
echo Using input from a pipe or STDIN redirection... >&2
- while read -r line ; do
- echo $line
- done | curl -F 'sprunge=<-' http://sprunge.us
+ curl -F 'sprunge=<-' http://sprunge.us
fi
}
diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
index c4e92a1fe..7468749f8 100644
--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
@@ -6,11 +6,17 @@
#
# zstyle :omz:plugins:ssh-agent agent-forwarding on
#
-# To load multiple identies use the identities style, For
+# To load multiple identities use the identities style, For
# example:
#
# zstyle :omz:plugins:ssh-agent id_rsa id_rsa2 id_github
#
+# To set the maximum lifetime of the identities, use the
+# lifetime style. The lifetime may be specified in seconds
+# or as described in sshd_config(5) (see TIME FORMATS)
+# If left unspecified, the default lifetime is forever.
+#
+# zstyle :omz:plugins:ssh-agent lifetime 4h
#
# CREDITS
#
@@ -27,15 +33,18 @@ local _plugin__forwarding
function _plugin__start_agent()
{
local -a identities
+ local lifetime
+ zstyle -s :omz:plugins:ssh-agent lifetime lifetime
# start ssh-agent and setup environment
- /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${_plugin__ssh_env}
+ /usr/bin/env ssh-agent ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' > ${_plugin__ssh_env}
chmod 600 ${_plugin__ssh_env}
. ${_plugin__ssh_env} > /dev/null
# load identies
zstyle -a :omz:plugins:ssh-agent identities identities
- echo starting...
+ echo starting ssh-agent...
+
/usr/bin/ssh-add $HOME/.ssh/${^identities}
}
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index f91be70e4..a06100472 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -3,18 +3,13 @@
function zle-keymap-select zle-line-init zle-line-finish {
# The terminal must be in application mode when ZLE is active for $terminfo
# values to be valid.
- if (( $+terminfo[smkx] && $+terminfo[rmkx] )); then
- case "$0" in
- (zle-line-init)
- # Enable terminal application mode.
- echoti smkx
- ;;
- (zle-line-finish)
- # Disable terminal application mode.
- echoti rmkx
- ;;
- esac
+ if (( ${+terminfo[smkx]} )); then
+ printf '%s' ${terminfo[smkx]}
fi
+ if (( ${+terminfo[rmkx]} )); then
+ printf '%s' ${terminfo[rmkx]}
+ fi
+
zle reset-prompt
zle -R
}
diff --git a/plugins/zeus/README.md b/plugins/zeus/README.md
index 4409943fe..d7c2aef80 100644
--- a/plugins/zeus/README.md
+++ b/plugins/zeus/README.md
@@ -25,6 +25,8 @@
* `zcu` aliases `zeus cucumber`
* `zucumber` aliases `zeus cucumber`
+* `zspec` aliases `zeus rspec`
+
* `zt` aliases `zeus test`
* `zest` aliases `zeus test`
diff --git a/plugins/zeus/zeus.plugin.zsh b/plugins/zeus/zeus.plugin.zsh
index 2fc7e1ebf..1658b34d3 100644
--- a/plugins/zeus/zeus.plugin.zsh
+++ b/plugins/zeus/zeus.plugin.zsh
@@ -4,7 +4,7 @@
# Always use bundler.
# Rails depends on bundler, so we can be pretty sure, that there are no
-# problems with this command. For all the other aliases I provided an
+# problems with this command. For all the other aliases I provided an
# alternative, in case people have conflicts with other plugins (e.g. suse).
alias zeus='bundle exec zeus'
@@ -40,6 +40,9 @@ alias zunner='zeus runner'
alias zcu='zeus cucumber'
alias zucumber='zeus cucumber'
+# Rspec
+alias zspec='zeus rspec'
+
# Test
alias zt='zeus test'
alias zest='zeus test'
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index bd6f1a6a2..c3107c06c 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -95,7 +95,7 @@ prompt_dir() {
prompt_status() {
local symbols
symbols=()
- [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}$RETVAL"
+ [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
diff --git a/themes/blinks.zsh-theme b/themes/blinks.zsh-theme
index 3db7012f4..ddb32f7c3 100644
--- a/themes/blinks.zsh-theme
+++ b/themes/blinks.zsh-theme
@@ -8,13 +8,23 @@ function _prompt_char() {
fi
}
+# This theme works with both the "dark" and "light" variants of the
+# Solarized color schema. Set the SOLARIZED_THEME variable to one of
+# these two values to choose. If you don't specify, we'll assume you're
+# using the "dark" variant.
+
+case ${SOLARIZED_THEME:-dark} in
+ light) bkg=white;;
+ *) bkg=black;;
+esac
+
ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{black}%B%F{green}%}]"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
PROMPT='%{%f%k%b%}
-%{%K{black}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{black}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
-%{%K{black}%}$(_prompt_char)%{%K{black}%} %#%{%f%k%b%} '
+%{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
+%{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '
RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'
diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
new file mode 100644
index 000000000..ef4c6d740
--- /dev/null
+++ b/themes/michelebologna.zsh-theme
@@ -0,0 +1,44 @@
+# reference colors
+GREEN="%{$fg_bold[green]%}"
+RED="%{$fg_bold[red]%}"
+CYAN="%{$fg_bold[cyan]%}"
+YELLOW="%{$fg_bold[yellow]%}"
+BLUE="%{$fg_bold[blue]%}"
+MAGENTA="%{$fg_bold[magenta]%}"
+WHITE="%{$fg_bold[white]%}"
+
+COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
+
+# color reset
+RESET_COLOR="%{$reset_color%}"
+
+# which color should be applied?
+USERNAME_NORMAL_COLOR=$WHITE
+USERNAME_ROOT_COLOR=$RED
+HOSTNAME_NORMAL_COLOR=$BLUE
+# uncomment next line if you want auto-generated hostname color
+#for i in `hostname`; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
+HOSTNAME_ROOT_COLOR=$RED
+HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
+CURRENT_DIR_COLOR=$CYAN
+
+# zsh commands
+USERNAME_COMMAND="%n"
+HOSTNAME_COMMAND="%m"
+CURRENT_DIR="%~"
+
+# output: colors + commands
+USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
+HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
+CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
+LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
+
+# git theming
+ZSH_THEME_GIT_PROMPT_PREFIX="("
+ZSH_THEME_GIT_PROMPT_SUFFIX=""
+ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
+ZSH_THEME_GIT_PROMPT_CLEAN=")"
+
+# wrap all together
+PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR '
+RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]'