summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/theme-and-appearance.zsh4
-rw-r--r--oh-my-zsh.sh15
-rw-r--r--plugins/autojump/autojump.plugin.zsh2
-rw-r--r--plugins/chruby/chruby.plugin.zsh99
-rw-r--r--plugins/heroku/_heroku6
-rw-r--r--plugins/mercurial/mercurial.plugin.zsh1
-rw-r--r--plugins/mvn/mvn.plugin.zsh12
-rw-r--r--plugins/pass/_pass2
-rw-r--r--plugins/pip/pip.plugin.zsh6
-rw-r--r--plugins/pyenv/pyenv.plugin.zsh31
-rw-r--r--plugins/rails/_rails (renamed from plugins/rails3/_rails3)17
-rw-r--r--plugins/rails/rails.plugin.zsh68
-rw-r--r--plugins/rails3/rails3.plugin.zsh36
-rw-r--r--plugins/rails4/rails4.plugin.zsh36
-rwxr-xr-xplugins/sublime/sublime.plugin.zsh38
-rw-r--r--plugins/suse/suse.plugin.zsh68
-rw-r--r--plugins/terminalapp/terminalapp.plugin.zsh2
-rw-r--r--plugins/zeus/README.md10
-rw-r--r--plugins/zeus/zeus.plugin.zsh14
-rw-r--r--themes/amuse.zsh-theme21
-rw-r--r--tools/upgrade.sh2
21 files changed, 364 insertions, 126 deletions
diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh
index 2677615c0..0353f9db4 100644
--- a/lib/theme-and-appearance.zsh
+++ b/lib/theme-and-appearance.zsh
@@ -11,6 +11,10 @@ then
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
+ elif [[ "$(uname -s)" == "OpenBSD" ]]; then
+ # On OpenBSD, test if "colorls" is installed (this one supports colors);
+ # otherwise, leave ls as is, because OpenBSD's ls doesn't support -G
+ colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
else
ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
fi
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 15c1dce44..2ae07668c 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -1,6 +1,5 @@
# Check for updates on initial load...
-if [ "$DISABLE_AUTO_UPDATE" != "true" ]
-then
+if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
/usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh $ZSH/tools/check_for_upgrade.sh
fi
@@ -69,8 +68,7 @@ done
unset config_file
# Load the theme
-if [ "$ZSH_THEME" = "random" ]
-then
+if [ "$ZSH_THEME" = "random" ]; then
themes=($ZSH/themes/*zsh-theme)
N=${#themes[@]}
((N=(RANDOM%N)+1))
@@ -78,13 +76,10 @@ then
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
else
- if [ ! "$ZSH_THEME" = "" ]
- then
- if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]
- then
+ if [ ! "$ZSH_THEME" = "" ]; then
+ if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]; then
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
- elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]
- then
+ elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]; then
source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
else
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
index f856f2f01..0aa14959d 100644
--- a/plugins/autojump/autojump.plugin.zsh
+++ b/plugins/autojump/autojump.plugin.zsh
@@ -5,6 +5,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed
. /etc/profile.d/autojump.zsh
elif [ -f /etc/profile.d/autojump.sh ]; then # gentoo installation
. /etc/profile.d/autojump.sh
+ elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
+ . /usr/local/share/autojump/autojump.zsh
elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
. $HOME/.autojump/etc/profile.d/autojump.zsh
elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
new file mode 100644
index 000000000..2a2c80cf6
--- /dev/null
+++ b/plugins/chruby/chruby.plugin.zsh
@@ -0,0 +1,99 @@
+#
+# INSTRUCTIONS
+#
+# With either a manual or brew installed chruby things should just work.
+#
+# If you'd prefer to specify an explicit path to load chruby from
+# you can set variables like so:
+#
+# zstyle :omz:plugins:chruby path /local/path/to/chruby.sh
+# zstyle :omz:plugins:chruby auto /local/path/to/auto.sh
+#
+# TODO
+# - autodetermine correct source path on non OS X systems
+# - completion if ruby-install exists
+
+# rvm and rbenv plugins also provide this alias
+alias rubies='chruby'
+
+local _chruby_path
+local _chruby_auto
+
+_homebrew-installed() {
+ whence brew &> /dev/null
+}
+
+_chruby-from-homebrew-installed() {
+ brew --prefix chruby &> /dev/null
+}
+
+_ruby-build_installed() {
+ whence ruby-build &> /dev/null
+}
+
+_ruby-install-installed() {
+ whence ruby-install &> /dev/null
+}
+
+# Simple definition completer for ruby-build
+if _ruby-build_installed; then
+ _ruby-build() { compadd $(ruby-build --definitions) }
+ compdef _ruby-build ruby-build
+fi
+
+_source_from_omz_settings() {
+ zstyle -s :omz:plugins:chruby path _chruby_path
+ zstyle -s :omz:plugins:chruby auto _chruby_auto
+
+ if _chruby_path && [[ -r _chruby_path ]]; then
+ source ${_chruby_path}
+ fi
+
+ if _chruby_auto && [[ -r _chruby_auto ]]; then
+ source ${_chruby_auto}
+ fi
+}
+
+_chruby_dirs() {
+ chrubydirs=($HOME/.rubies/ $PREFIX/opt/rubies)
+ for dir in chrubydirs; do
+ if [[ -d $dir ]]; then
+ RUBIES+=$dir
+ fi
+ done
+}
+
+if _homebrew-installed && _chruby-from-homebrew-installed ; then
+ source $(brew --prefix chruby)/share/chruby/chruby.sh
+ source $(brew --prefix chruby)/share/chruby/auto.sh
+ _chruby_dirs
+elif [[ -r "/usr/local/share/chruby/chruby.sh" ]] ; then
+ source /usr/local/share/chruby/chruby.sh
+ source /usr/local/share/chruby/auto.sh
+ _chruby_dirs
+else
+ _source_from_omz_settings
+ _chruby_dirs
+fi
+
+function ensure_chruby() {
+ $(whence chruby)
+}
+
+function current_ruby() {
+ local _ruby
+ _ruby="$(chruby |grep \* |tr -d '* ')"
+ if [[ $(chruby |grep -c \*) -eq 1 ]]; then
+ echo ${_ruby}
+ else
+ echo "system"
+ fi
+}
+
+function chruby_prompt_info() {
+ echo "$(current_ruby)"
+}
+
+# complete on installed rubies
+_chruby() { compadd $(chruby | tr -d '* ') }
+compdef _chruby chruby
diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku
index a95c38647..46663303a 100644
--- a/plugins/heroku/_heroku
+++ b/plugins/heroku/_heroku
@@ -23,8 +23,10 @@ _1st_arguments=(
"auth\:login":"log in with your heroku credentials"
"auth\:logout":"clear local authentication credentials"
"config":"display the config vars for an app"
- "config\:add":"add one or more config vars"
- "config\:remove":"remove a config var"
+ "config\:pull":"pull heroku config vars down to the local environment"
+ "config\:push":"push local config vars to heroku"
+ "config\:set":"set one or more config vars"
+ "config\:unset":"unset one or more config vars"
"db\:push":"push local data up to your app"
"db\:pull":"pull heroku data down into your local database"
"domains":"list custom domains for an app"
diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh
index c18aa726c..d2db89d04 100644
--- a/plugins/mercurial/mercurial.plugin.zsh
+++ b/plugins/mercurial/mercurial.plugin.zsh
@@ -13,6 +13,7 @@ alias hglr='hg pull --rebase'
alias hgo='hg outgoing'
alias hgp='hg push'
alias hgs='hg status'
+alias hgsl='log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" '
# this is the 'git commit --amend' equivalent
alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
index 799f6fc8c..0c9141907 100644
--- a/plugins/mvn/mvn.plugin.zsh
+++ b/plugins/mvn/mvn.plugin.zsh
@@ -24,16 +24,18 @@ export RESET_FORMATTING=`tput sgr0`
# Wrapper function for Maven's mvn command.
mvn-color()
{
- # Filter mvn output using sed
- mvn $@ | sed -e "s/\(\[INFO\]\ \-.*\)/${TEXT_BLUE}${BOLD}\1/g" \
- -e "s/\(\[INFO\]\ \[.*\)/${RESET_FORMATTING}${BOLD}\1${RESET_FORMATTING}/g" \
+ (
+ # Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
+ unset LANG
+ LC_CTYPE=C mvn $@ | sed -e "s/\(\[INFO\]\)\(.*\)/${TEXT_BLUE}${BOLD}\1${RESET_FORMATTING}\2/g" \
-e "s/\(\[INFO\]\ BUILD SUCCESSFUL\)/${BOLD}${TEXT_GREEN}\1${RESET_FORMATTING}/g" \
- -e "s/\(\[WARNING\].*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}/g" \
- -e "s/\(\[ERROR\].*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}/g" \
+ -e "s/\(\[WARNING\]\)\(.*\)/${BOLD}${TEXT_YELLOW}\1${RESET_FORMATTING}\2/g" \
+ -e "s/\(\[ERROR\]\)\(.*\)/${BOLD}${TEXT_RED}\1${RESET_FORMATTING}\2/g" \
-e "s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/${BOLD}${TEXT_GREEN}Tests run: \1${RESET_FORMATTING}, Failures: ${BOLD}${TEXT_RED}\2${RESET_FORMATTING}, Errors: ${BOLD}${TEXT_RED}\3${RESET_FORMATTING}, Skipped: ${BOLD}${TEXT_YELLOW}\4${RESET_FORMATTING}/g"
# Make sure formatting is reset
echo -ne ${RESET_FORMATTING}
+ )
}
# Override the mvn command with the colorized one.
diff --git a/plugins/pass/_pass b/plugins/pass/_pass
index f6c1a6c4b..d8ec38828 100644
--- a/plugins/pass/_pass
+++ b/plugins/pass/_pass
@@ -101,7 +101,7 @@ _pass_cmd_show () {
_pass_complete_entries_helper () {
local IFS=$'\n'
local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
- _values -C 'passwords' $(find "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort)
+ _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort)
}
_pass_complete_entries_with_subdirs () {
diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh
index 71f977bbf..b5433ae9d 100644
--- a/plugins/pip/pip.plugin.zsh
+++ b/plugins/pip/pip.plugin.zsh
@@ -18,12 +18,12 @@ zsh-pip-clear-cache() {
}
zsh-pip-clean-packages() {
- sed -nr '/<a href/ s/.*>([^<]+).*/\1/p'
+ sed -n '/<a href/ s/.*>\([^<]\{1,\}\).*/\1/p'
}
zsh-pip-cache-packages() {
- if [[ ! -d ${PIP_CACHE_FILE:h} ]]; then
- mkdir -p ${PIP_CACHE_FILE:h}
+ if [[ ! -d ${ZSH_PIP_CACHE_FILE:h} ]]; then
+ mkdir -p ${ZSH_PIP_CACHE_FILE:h}
fi
if [[ ! -f $ZSH_PIP_CACHE_FILE ]]; then
diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh
new file mode 100644
index 000000000..b3dc7aa17
--- /dev/null
+++ b/plugins/pyenv/pyenv.plugin.zsh
@@ -0,0 +1,31 @@
+_homebrew-installed() {
+ type brew &> /dev/null
+}
+
+_pyenv-from-homebrew-installed() {
+ brew --prefix pyenv &> /dev/null
+}
+
+FOUND_PYENV=0
+pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv")
+if _homebrew-installed && _pyenv-from-homebrew-installed ; then
+ pyenvdirs=($(brew --prefix pyenv) "${pyenvdirs[@]}")
+fi
+
+for pyenvdir in "${pyenvdirs[@]}" ; do
+ if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then
+ FOUND_PYENV=1
+ export PYENV_ROOT=$pyenvdir
+ export PATH=${pyenvdir}/bin:$PATH
+ eval "$(pyenv init --no-rehash - zsh)"
+
+ function pyenv_prompt_info() {
+ echo "$(pyenv version-name)"
+ }
+ fi
+done
+unset pyenvdir
+
+if [ $FOUND_PYENV -eq 0 ] ; then
+ function pyenv_prompt_info() { echo "system: $(python -V 2>&1 | cut -f 2 -d ' ')" }
+fi
diff --git a/plugins/rails3/_rails3 b/plugins/rails/_rails
index 97915e68b..96f57ce64 100644
--- a/plugins/rails3/_rails3
+++ b/plugins/rails/_rails
@@ -1,10 +1,6 @@
#compdef rails
#autoload
-# rails 3 zsh completion, based on homebrew completion
-# Extracted from https://github.com/robbyrussell/oh-my-zsh/blob/30620d463850c17f86e7a56fbf6a8b5e793a4e07/plugins/rails3/_rails3
-# Published by Christopher Chow
-
local -a _1st_arguments
_1st_arguments=(
'generate:Generate new code (short-cut alias: "g")'
@@ -14,14 +10,20 @@ _1st_arguments=(
'new:Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app"'
'application:Generate the Rails application code'
'destroy:Undo code generated with "generate"'
+
'benchmarker:See how fast a piece of code runs'
'profiler:Get profile information from a piece of code'
'plugin:Install a plugin'
+
+ 'plugin new:Generates skeleton for developing a Rails plugin'
+ 'runner:Run a piece of code in the application environment (short-cut alias: "r")'
)
_rails_generate_arguments() {
generate_arguments=(
+ assets
controller
+ decorator
generator
helper
integration_test
@@ -36,9 +38,11 @@ _rails_generate_arguments() {
scaffold_controller
session_migration
stylesheets
+ task
)
}
+
_arguments \
'(--version)--version[show version]' \
'(--help)--help[show help]' \
@@ -50,7 +54,10 @@ if (( CURRENT == 1 )); then
fi
case "$words[1]" in
- generate)
+ g|generate)
+ _rails_generate_arguments
+ _wanted generate_arguments expl 'all generate' compadd -a generate_arguments ;;
+ d|destroy)
_rails_generate_arguments
_wanted generate_arguments expl 'all generate' compadd -a generate_arguments ;;
esac
diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
index dd8b174b2..23d15a9a1 100644
--- a/plugins/rails/rails.plugin.zsh
+++ b/plugins/rails/rails.plugin.zsh
@@ -1,20 +1,70 @@
+function _rails_command () {
+ if [ -e "script/server" ]; then
+ ruby script/$@
+ elif [ -e "script/rails" ]; then
+ ruby script/rails $@
+ elif [ -e "bin/rails" ]; then
+ bin/rails $@
+ else
+ rails $@
+ fi
+}
+
+function _rake_command () {
+ if [ -e "bin/rake" ]; then
+ bin/rake $@
+ else
+ rake $@
+ fi
+}
+
+alias rails='_rails_command'
+compdef _rails_command=rails
+
+alias rake='_rake_command'
+compdef _rake_command=rake
+
+alias devlog='tail -f log/development.log'
+alias prodlog='tail -f log/production.log'
+alias testlog='tail -f log/test.log'
+
+alias -g RED='RAILS_ENV=development'
+alias -g REP='RAILS_ENV=production'
+alias -g RET='RAILS_ENV=test'
+
+# Rails aliases
+alias rc='rails console'
+alias rd='rails destroy'
+alias rdb='rails dbconsole'
+alias rg='rails generate'
+alias rgm='rails generate migration'
+alias rp='rails plugin'
+alias ru='rails runner'
+alias rs='rails server'
+alias rsd='rails server --debugger'
+
+# Rake aliases
+alias rdm='rake db:migrate'
+alias rdr='rake db:rollback'
+alias rdc='rake db:create'
+alias rds='rake db:seed'
+alias rdd='rake db:drop'
+alias rdtc='rake db:test:clone'
+alias rdtp='rake db:test:prepare'
+
+alias rlc='rake log:clear'
+alias rn='rake notes'
+alias rr='rake routes'
+
+# legacy stuff
alias ss='thin --stats "/thin/stats" start'
alias sg='ruby script/generate'
alias sd='ruby script/destroy'
alias sp='ruby script/plugin'
alias sr='ruby script/runner'
alias ssp='ruby script/spec'
-alias rdbm='rake db:migrate'
-alias rdbtp='rake db:test:prepare'
-alias migrate='rake db:migrate && rake db:test:prepare'
alias sc='ruby script/console'
alias sd='ruby script/server --debugger'
-alias devlog='tail -f log/development.log'
-alias testlog='tail -f log/test.log'
-alias prodlog='tail -f log/production.log'
-alias -g RET='RAILS_ENV=test'
-alias -g REP='RAILS_ENV=production'
-alias -g RED='RAILS_ENV=development'
function remote_console() {
/usr/bin/env ssh $1 "( cd $2 && ruby script/console production )"
diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh
index b53d18d08..261b92108 100644
--- a/plugins/rails3/rails3.plugin.zsh
+++ b/plugins/rails3/rails3.plugin.zsh
@@ -1,32 +1,4 @@
-# Rails 3 aliases, backwards-compatible with Rails 2.
-
-function _rails_command () {
- if [ -e "script/server" ]; then
- ruby script/$@
- else
- if [ -e "bin/rails" ]; then
- bin/rails $@
- else
- rails $@
- fi
- fi
-}
-
-alias rc='_rails_command console'
-alias rd='_rails_command destroy'
-alias rdb='_rails_command dbconsole'
-alias rdbm='rake db:migrate db:test:clone'
-alias rg='_rails_command generate'
-alias rgm='_rails_command generate migration'
-alias rp='_rails_command plugin'
-alias ru='_rails_command runner'
-alias rs='_rails_command server'
-alias rsd='_rails_command server --debugger'
-alias devlog='tail -f log/development.log'
-alias testlog='tail -f log/test.log'
-alias prodlog='tail -f log/production.log'
-alias rdm='rake db:migrate'
-alias rdr='rake db:rollback'
-alias -g RET='RAILS_ENV=test'
-alias -g REP='RAILS_ENV=production'
-alias -g RED='RAILS_ENV=development'
+echo "It looks like you have been using the 'rails3' plugin,"
+echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
+echo "You will want to modify your ~/.zshrc configuration to begin using it."
+echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
diff --git a/plugins/rails4/rails4.plugin.zsh b/plugins/rails4/rails4.plugin.zsh
index cb6cf816d..5452c242c 100644
--- a/plugins/rails4/rails4.plugin.zsh
+++ b/plugins/rails4/rails4.plugin.zsh
@@ -1,32 +1,4 @@
-# Rails 4 aliases
-
-function _rails_command () {
- if [ -e "script/server" ]; then
- ruby script/$@
- elif [ -e "script/rails" ]; then
- ruby script/rails $@
- else
- ruby bin/rails $@
- fi
-}
-
-alias rc='_rails_command console'
-alias rd='_rails_command destroy'
-alias rdb='_rails_command dbconsole'
-alias rdbm='rake db:migrate db:test:clone'
-alias rg='_rails_command generate'
-alias rgm='_rails_command generate migration'
-alias rp='_rails_command plugin'
-alias ru='_rails_command runner'
-alias rs='_rails_command server'
-alias rsd='_rails_command server --debugger'
-alias devlog='tail -f log/development.log'
-alias testlog='tail -f log/test.log'
-alias prodlog='tail -f log/production.log'
-alias rdm='rake db:migrate'
-alias rdc='rake db:create'
-alias rdr='rake db:rollback'
-alias rds='rake db:seed'
-alias rlc='rake log:clear'
-alias rn='rake notes'
-alias rr='rake routes'
+echo "It looks like you have been using the 'rails4' plugin,"
+echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
+echo "You will want to modify your ~/.zshrc configuration to begin using it."
+echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index 72f56754c..566279183 100755
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -2,30 +2,32 @@
local _sublime_darwin_paths > /dev/null 2>&1
_sublime_darwin_paths=(
- "/usr/local/bin/subl"
- "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
- "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
- "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
- "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
+ "/usr/local/bin/subl"
+ "$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
+ "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
+ "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
+ "/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
+ "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
+ "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
)
if [[ $('uname') == 'Linux' ]]; then
- if [ -f '/usr/bin/sublime_text' ]; then
- st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
- else
- st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
- fi
- alias st=st_run
+ if [ -f '/usr/bin/sublime_text' ]; then
+ st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
+ else
+ st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
+ fi
+ alias st=st_run
elif [[ $('uname') == 'Darwin' ]]; then
- for _sublime_path in $_sublime_darwin_paths; do
- if [[ -a $_sublime_path ]]; then
- alias subl="'$_sublime_path'"
- alias st=subl
- break
- fi
- done
+ for _sublime_path in $_sublime_darwin_paths; do
+ if [[ -a $_sublime_path ]]; then
+ alias subl="'$_sublime_path'"
+ alias st=subl
+ break
+ fi
+ done
fi
alias stt='st .'
diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh
index d46286948..afd8ecabd 100644
--- a/plugins/suse/suse.plugin.zsh
+++ b/plugins/suse/suse.plugin.zsh
@@ -1,7 +1,61 @@
-alias zi='sudo zypper install'
-alias zrf='sudo zypper refresh'
-alias zs='zypper search'
-alias zup='sudo zypper dist-upgrade'
-alias zrm='sudo zypper remove'
-alias zp='sudo zypper patch'
-alias zps='sudo zypper ps'
+#Alias for Zypper according to the offical Zypper's alias
+
+#Main commands
+alias z='sudo zypper' #call zypper
+alias zh='sudo zypper -h' #print help
+alias zhse='sudo zypper -h se' #print help for the search command
+alias zlicenses='sudo zypper licenses' #prints a report about licenses and EULAs of installed packages
+alias zps='sudo zypper ps' #list process using deleted files
+alias zshell='sudo zypper shell' #open a zypper shell session
+alias zsource-download='sudo zypper source-download' #download source rpms for all installed packages
+alias ztos='sudo zypper tos' #shows the ID string of the target operating system
+alias zvcmp='sudo zypper vcmp' #tell whether version1 is older or newer than version2
+
+#Packages commands
+alias zin='sudo zypper in' #install packages
+alias zinr='sudo zypper inr' #install newly added packages recommended by already installed ones
+alias zrm='sudo zypper rm' #remove packages
+alias zsi='sudo zypper si' #install source of a package
+alias zve='sudo zypper ve' #verify dependencies of installed packages
+
+#Updates commands
+alias zdup='sudo zypper dup' #upgrade packages
+alias zlp='sudo zypper lp' #list necessary patchs
+alias zlu='sudo zypper lu' #list updates
+alias zpchk='sudo zypper pchk' #check for patches
+alias zup='sudo zypper up' #update packages
+alias zpatch='sudo zypper patch' #install patches
+
+#Request commands
+alias zif='sudo zypper if' #display info about packages
+alias zpa='sudo zypper pa' #list packages
+alias zpatch-info='sudo zypper patch-info' #display info about patches
+alias zpattern-info='sudo zypper patch-info' #display info about patterns
+alias zproduct-info='sudo zypper patch-info' #display info about products
+alias zpch='sudo zypper pch' #list all patches
+alias zpd='sudo zypper pd' #list products
+alias zpt='sudo zypper pt' #list patterns
+alias zse='sudo zypper se' #search for packages
+alias zwp='sudo zypper wp' #list all packages providing the specified capability
+
+#Repositories commands
+alias zar='sudo zypper ar' #add a repository
+alias zcl='sudo zypper clean' #clean cache
+alias zlr='sudo zypper lr' #list repositories
+alias zmr='sudo zypper mr' #modify repositories
+alias znr='sudo zypper nr' #rename repositories (for the alias only)
+alias zref='sudo zypper ref' #refresh repositories
+alias zrr='sudo zypper rr' #remove repositories
+
+#Services commands
+alias zas='sudo zypper as' #adds a service specified by URI to the system
+alias zms='sudo zypper ms' #modify properties of specified services
+alias zrefs='sudo zypper refs' #refreshing a service mean executing the service's special task
+alias zrs='sudo zypper rs' #remove specified repository index service from the sytem
+alias zls='sudo zypper ls' #list services defined on the system
+
+#Package Locks Management commands
+alias zal='sudo zypper al' #add a package lock
+alias zcl='sudo zypper cl' #Remove unused locks
+alias zll='sudo zypper ll' #list currently active package locks
+alias zrl='sudo zypper rl' #remove specified package lock
diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh
index 2249b1e2f..6e47ee188 100644
--- a/plugins/terminalapp/terminalapp.plugin.zsh
+++ b/plugins/terminalapp/terminalapp.plugin.zsh
@@ -32,7 +32,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
# Register the function so it is called whenever the working
# directory changes.
autoload add-zsh-hook
- add-zsh-hook chpwd update_terminal_cwd
+ add-zsh-hook precmd update_terminal_cwd
# Tell the terminal about the initial directory.
update_terminal_cwd
diff --git a/plugins/zeus/README.md b/plugins/zeus/README.md
index d7c2aef80..8964eaaec 100644
--- a/plugins/zeus/README.md
+++ b/plugins/zeus/README.md
@@ -41,3 +41,13 @@
* `zsw` aliases `rm .zeus.sock`
* `zweep` aliases `rm .zeus.sock`
+
+`zdbr` aliases `zeus rake db:reset db:test:prepare`
+`zdbreset` aliases `zeus rake db:reset db:test:prepare`
+
+`zdbm` aliases `zeus rake db:migrate db:test:prepare`
+`zdbmigrate` aliases `zeus rake db:migrate db:test:prepare`
+
+`zdbc` aliases `zeus rake db:create`
+
+`zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare`
diff --git a/plugins/zeus/zeus.plugin.zsh b/plugins/zeus/zeus.plugin.zsh
index eddfb4f94..5ec9fa579 100644
--- a/plugins/zeus/zeus.plugin.zsh
+++ b/plugins/zeus/zeus.plugin.zsh
@@ -53,3 +53,17 @@ alias zall='zeus test test/unit/*; zeus test test/functional/; zeus cucumber'
# Clean up crashed zeus instances.
alias zsw='rm .zeus.sock'
alias zweep='rm .zeus.sock'
+
+# Reset database
+alias zdbr='zeus rake db:reset db:test:prepare'
+alias zdbreset='zeus rake db:reset db:test:prepare'
+
+# Migrate and prepare database
+alias zdbm='zeus rake db:migrate db:test:prepare'
+alias zdbmigrate='zeus rake db:migrate db:test:prepare'
+
+# Create database
+alias zdbc='zeus rake db:create'
+
+# Create, migrate and prepare database
+alias zdbcm='zeus rake db:create db:migrate db:test:prepare' \ No newline at end of file
diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme
new file mode 100644
index 000000000..548f6d39d
--- /dev/null
+++ b/themes/amuse.zsh-theme
@@ -0,0 +1,21 @@
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+rvm_current() {
+ rvm current 2>/dev/null
+}
+
+rbenv_version() {
+ rbenv version 2>/dev/null | awk '{print $1}'
+}
+
+PROMPT='
+%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
+$ '
+
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}⭠ "
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+
+RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
index e04fc672f..9a8497d96 100644
--- a/tools/upgrade.sh
+++ b/tools/upgrade.sh
@@ -1,6 +1,6 @@
printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh"
cd "$ZSH"
-if git pull --rebase origin master
+if git pull --rebase --stat origin master
then
printf '\033[0;32m%s\033[0m\n' ' __ __ '
printf '\033[0;32m%s\033[0m\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '