summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--README.textile2
-rw-r--r--custom/plugins/gitignore/gitignore.plugin.zsh12
-rw-r--r--custom/plugins/sfffe/sfffe.plugin.zsh28
-rw-r--r--oh-my-zsh.sh14
-rw-r--r--plugins/brew/_brew3
-rw-r--r--plugins/bundler/bundler.plugin.zsh17
-rw-r--r--plugins/extract/extract.plugin.zsh2
-rw-r--r--plugins/forklift/forklift.plugin.zsh35
-rw-r--r--plugins/git-flow/git-flow.plugin.zsh6
-rw-r--r--plugins/git/git.plugin.zsh25
-rw-r--r--plugins/jump/jump.plugin.zsh58
-rw-r--r--plugins/mosh/mosh.plugin.zsh2
-rw-r--r--plugins/node/node.plugin.zsh10
-rw-r--r--plugins/nvm/_nvm26
-rw-r--r--plugins/nvm/nvm.plugin.zsh3
-rw-r--r--plugins/pip/_pip11
-rw-r--r--plugins/rvm/rvm.plugin.zsh2
-rwxr-xr-xplugins/sublime/sublime.plugin.zsh3
-rw-r--r--plugins/tmux/tmux.plugin.zsh10
-rw-r--r--plugins/web-search/web-search.plugin.zsh21
-rw-r--r--templates/zshrc.zsh-template2
-rw-r--r--themes/agnoster.zsh-theme2
-rw-r--r--themes/gallois.zsh-theme4
-rw-r--r--themes/sunrise.zsh-theme22
-rwxr-xr-xtools/theme_chooser.sh3
26 files changed, 284 insertions, 44 deletions
diff --git a/.gitignore b/.gitignore
index 51a5ee6c3..5db11ce5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,8 @@
locals.zsh
log/.zsh_history
projects.zsh
-custom/*
-!custom/example
-!custom/example.zsh
+custom/example
+custom/example.zsh
*.swp
!custom/example.zshcache
cache/
diff --git a/README.textile b/README.textile
index 1916d9f4e..86dd5da22 100644
--- a/README.textile
+++ b/README.textile
@@ -1,3 +1,5 @@
+!https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png!
+
oh-my-zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes, and few things that make you shout...
bq. "OH MY ZSHELL!"
diff --git a/custom/plugins/gitignore/gitignore.plugin.zsh b/custom/plugins/gitignore/gitignore.plugin.zsh
new file mode 100644
index 000000000..332497cec
--- /dev/null
+++ b/custom/plugins/gitignore/gitignore.plugin.zsh
@@ -0,0 +1,12 @@
+function gi() { curl http://gitignore.io/api/$@ ;}
+
+_gitignireio_get_command_list() {
+ curl -s http://gitignore.io/api/list | tr "," "\n"
+}
+
+_gitignireio () {
+ compset -P '*,'
+ compadd -S '' `_gitignireio_get_command_list`
+}
+
+compdef _gitignireio gi \ No newline at end of file
diff --git a/custom/plugins/sfffe/sfffe.plugin.zsh b/custom/plugins/sfffe/sfffe.plugin.zsh
new file mode 100644
index 000000000..a0f034908
--- /dev/null
+++ b/custom/plugins/sfffe/sfffe.plugin.zsh
@@ -0,0 +1,28 @@
+# ------------------------------------------------------------------------------
+# FILE: sfffe.plugin.zsh
+# DESCRIPTION: search file for FE
+# AUTHOR: yleo77 (ylep77@gmail.com)
+# VERSION: 0.1
+# REQUIRE: ack
+# ------------------------------------------------------------------------------
+
+if [ ! -x $(which ack) ]; then
+ echo \'ack\' is not installed!
+ exit -1
+fi
+
+ajs() {
+ ack "$@" --type js
+}
+
+acss() {
+ ack "$@" --type css
+}
+
+fjs() {
+ find ./ -name "$@*" -type f | grep '\.js'
+}
+
+fcss() {
+ find ./ -name "$@*" -type f | grep '\.css'
+}
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 93c10e3d2..15c1dce44 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -38,10 +38,20 @@ for plugin ($plugins); do
fi
done
+# Figure out the SHORT hostname
+if [ -n "$commands[scutil]" ]; then
+ # OS X
+ SHORT_HOST=$(scutil --get ComputerName)
+else
+ SHORT_HOST=${HOST/.*/}
+fi
+
+# Save the location of the current completion dump file.
+ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
+
# Load and run compinit
autoload -U compinit
-compinit -i
-
+compinit -i -d "${ZSH_COMPDUMP}"
# Load all of the plugins that were defined in ~/.zshrc
for plugin ($plugins); do
diff --git a/plugins/brew/_brew b/plugins/brew/_brew
index e43ba2900..bf0a286c1 100644
--- a/plugins/brew/_brew
+++ b/plugins/brew/_brew
@@ -28,6 +28,7 @@ _1st_arguments=(
'missing:check all installed formuale for missing dependencies.'
'outdated:list formulas for which a newer version is available'
'prune:remove dead links'
+ 'reinstall:reinstall a formula'
'remove:remove a formula'
'search:search for a formula (/regex/ or string)'
'server:start a local web app that lets you browse formulae (requires Sinatra)'
@@ -75,7 +76,7 @@ case "$words[1]" in
install|home|homepage|log|info|abv|uses|cat|deps|edit|options|versions)
_brew_all_formulae
_wanted formulae expl 'all formulae' compadd -a formulae ;;
- remove|rm|uninstall|unlink|cleanup|link|ln)
+ reinstall|remove|rm|uninstall|unlink|cleanup|link|ln)
_brew_installed_formulae
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
esac
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index c01241409..2e657e5a8 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -1,13 +1,25 @@
alias be="bundle exec"
-alias bi="bundle install"
alias bl="bundle list"
alias bp="bundle package"
alias bo="bundle open"
alias bu="bundle update"
+bundler_version=`bundle version | cut -d' ' -f3`
+if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
+ if [[ "$(uname)" == 'Darwin' ]]
+ then
+ local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
+ else
+ local cores_num="$(nproc)"
+ fi
+ eval "alias bi='bundle install --jobs=$cores_num'"
+else
+ alias bi='bundle install'
+fi
+
# The following is based on https://github.com/gma/bundler-exec
-bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard jekyll kitchen knife middleman nanoc rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor thin thor unicorn unicorn_rails puma)
+bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard jekyll kitchen knife middleman nanoc rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails puma)
## Functions
@@ -42,3 +54,4 @@ for cmd in $bundled_commands; do
compdef _$cmd bundled_$cmd=$cmd
fi
done
+
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
index 23e86c593..7352e5bad 100644
--- a/plugins/extract/extract.plugin.zsh
+++ b/plugins/extract/extract.plugin.zsh
@@ -52,7 +52,7 @@ function extract() {
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;;
- (*.zip) unzip "$1" -d $extract_dir ;;
+ (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
diff --git a/plugins/forklift/forklift.plugin.zsh b/plugins/forklift/forklift.plugin.zsh
index 056069d36..b0e60a434 100644
--- a/plugins/forklift/forklift.plugin.zsh
+++ b/plugins/forklift/forklift.plugin.zsh
@@ -1,5 +1,6 @@
-# Open folder in ForkLift.app from console
+# Open folder in ForkLift.app of ForkLift2.app from console
# Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de
+# Updated to support ForkLift2 by Johan Kaving
#
# Usage:
# fl [<folder>]
@@ -22,9 +23,33 @@ function fl {
fi
fi
osascript 2>&1 1>/dev/null <<END
- tell application "ForkLift"
- activate
- end tell
+
+ try
+ tell application "Finder"
+ set appName to name of application file id "com.binarynights.ForkLift2"
+ end tell
+ on error err_msg number err_num
+ tell application "Finder"
+ set appName to name of application file id "com.binarynights.ForkLift"
+ end tell
+ end try
+
+ if application appName is running
+ tell application appName
+ activate
+ end tell
+ else
+ tell application appName
+ activate
+ end tell
+ repeat until application appName is running
+ delay 1
+ end repeat
+ tell application appName
+ activate
+ end tell
+ end if
+
tell application "System Events"
tell application process "ForkLift"
try
@@ -36,7 +61,7 @@ function fl {
keystroke "g" using {command down, shift down}
tell sheet 1 of topWindow
set value of text field 1 to "$PWD"
- keystroke return
+ keystroke return
end tell
end tell
end tell
diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh
index ab9c0c848..b9ea06844 100644
--- a/plugins/git-flow/git-flow.plugin.zsh
+++ b/plugins/git-flow/git-flow.plugin.zsh
@@ -20,6 +20,12 @@
# c. Or, use this file as a oh-my-zsh plugin.
#
+#Alias
+alias gf='git flow'
+alias gcd='git checkout develop'
+alias gch='git checkout hotfix'
+alias gcr='git checkout release'
+
_git-flow ()
{
local curcontext="$curcontext" state line
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 9596931eb..c7e98654a 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -5,6 +5,8 @@ alias gst='git status'
compdef _git gst=git-status
alias gd='git diff'
compdef _git gd=git-diff
+alias gdc='git diff --cached'
+compdef _git gdc=git-diff
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git pull --rebase'
@@ -54,9 +56,9 @@ compdef gcount=git
alias gcl='git config --list'
alias gcp='git cherry-pick'
compdef _git gcp=git-cherry-pick
-alias glg='git log --stat --max-count=5'
+alias glg='git log --stat --max-count=10'
compdef _git glg=git-log
-alias glgg='git log --graph --max-count=5'
+alias glgg='git log --graph --max-count=10'
compdef _git glgg=git-log
alias glgga='git log --graph --decorate --all'
compdef _git glgga=git-log
@@ -72,7 +74,10 @@ alias grh='git reset HEAD'
alias grhh='git reset HEAD --hard'
alias gclean='git reset --hard && git clean -dfx'
alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
-alias gf='git ls-files | grep'
+
+#remove the gf alias
+#alias gf='git ls-files | grep'
+
alias gpoat='git push origin --all && git push origin --tags'
alias gmt='git mergetool --no-prompt'
compdef _git gm=git-mergetool
@@ -130,3 +135,17 @@ function _git_log_prettily(){
}
alias glp="_git_log_prettily"
compdef _git glp=git-log
+
+# Work In Progress (wip)
+# These features allow to pause a branch development and switch to another one (wip)
+# When you want to go back to work, just unwip it
+#
+# This function return a warning if the current branch is a wip
+function work_in_progress() {
+ if $(git log -n 1 | grep -q -c wip); then
+ echo "WIP!!"
+ fi
+}
+# these alias commit and uncomit wip branches
+alias gwip='git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m "wip"'
+alias gunwip='git log -n 1 | grep -q -c wip && git reset HEAD~1'
diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
new file mode 100644
index 000000000..5096879d8
--- /dev/null
+++ b/plugins/jump/jump.plugin.zsh
@@ -0,0 +1,58 @@
+# Easily jump around the file system by manually adding marks
+# marks are stored as symbolic links in the directory $MARKPATH (default $HOME/.marks)
+#
+# jump FOO: jump to a mark named FOO
+# mark FOO: create a mark named FOO
+# unmark FOO: delete a mark
+# marks: lists all marks
+#
+export MARKPATH=$HOME/.marks
+
+jump() {
+ cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
+}
+
+mark() {
+ if (( $# == 0 )); then
+ MARK=$(basename "$(pwd)")
+ else
+ MARK="$1"
+ fi
+ if read -q \?"Mark $(pwd) as ${MARK}? (y/n) "; then
+ mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$MARK"
+ fi
+}
+
+unmark() {
+ rm -i "$MARKPATH/$1"
+}
+
+autoload colors
+marks() {
+ for link in $MARKPATH/*(@); do
+ local markname="$fg[cyan]${link:t}$reset_color"
+ local markpath="$fg[blue]$(readlink $link)$reset_color"
+ printf "%s\t" $markname
+ printf "-> %s \t\n" $markpath
+ done
+}
+
+_completemarks() {
+ if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
+ reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g'))
+ else
+ if readlink -e "${MARKPATH}"/* &>/dev/null; then
+ reply=($(ls "${MARKPATH}"))
+ fi
+ fi
+}
+compctl -K _completemarks jump
+compctl -K _completemarks unmark
+
+_mark_expansion() {
+ setopt extendedglob
+ autoload -U modify-current-argument
+ modify-current-argument '$(readlink "$MARKPATH/$ARG")'
+}
+zle -N _mark_expansion
+bindkey "^g" _mark_expansion
diff --git a/plugins/mosh/mosh.plugin.zsh b/plugins/mosh/mosh.plugin.zsh
new file mode 100644
index 000000000..ea36b7ee9
--- /dev/null
+++ b/plugins/mosh/mosh.plugin.zsh
@@ -0,0 +1,2 @@
+# Allow SSH tab completion for mosh hostnames
+compdef mosh=ssh
diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
index 3bbed6f04..2d78f2b4c 100644
--- a/plugins/node/node.plugin.zsh
+++ b/plugins/node/node.plugin.zsh
@@ -1,5 +1,13 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
- open "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
+ # get the open command
+ local open_cmd
+ if [[ $(uname -s) == 'Darwin' ]]; then
+ open_cmd='open'
+ else
+ open_cmd='xdg-open'
+ fi
+
+ $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
}
diff --git a/plugins/nvm/_nvm b/plugins/nvm/_nvm
new file mode 100644
index 000000000..a95c9e375
--- /dev/null
+++ b/plugins/nvm/_nvm
@@ -0,0 +1,26 @@
+#compdef nvm
+#autoload
+
+[[ -s ~/.nvm/nvm.sh ]] || return 0
+
+local -a _1st_arguments
+_1st_arguments=(
+ 'help:show help'
+ 'install:download and install a version'
+ 'uninstall:uninstall a version'
+ 'use:modify PATH to use version'
+ 'run:run version with given arguments'
+ 'ls:list installed versions or versions matching a given description'
+ 'ls-remote:list remote versions available for install'
+ 'deactivate:undo effects of NVM on current shell'
+ 'alias:show or set aliases'
+ 'unalias:deletes an alias'
+ 'copy-packages:install global NPM packages to current version'
+)
+
+_arguments -C '*:: :->subcmds' && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "nvm subcommand" _1st_arguments
+ return
+fi \ No newline at end of file
diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh
new file mode 100644
index 000000000..9709719fe
--- /dev/null
+++ b/plugins/nvm/nvm.plugin.zsh
@@ -0,0 +1,3 @@
+# The addition 'nvm install' attempts in ~/.profile
+
+[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh
diff --git a/plugins/pip/_pip b/plugins/pip/_pip
index df53ba5ce..fb8765c7e 100644
--- a/plugins/pip/_pip
+++ b/plugins/pip/_pip
@@ -6,8 +6,8 @@
_pip_all() {
# we cache the list of packages (originally from the macports plugin)
if (( ! $+piplist )); then
- echo -n " (caching package index...)"
- piplist=($(pip search * | cut -d ' ' -f 1 | tr '[A-Z]' '[a-z]'))
+ echo -n " (caching package index...)"
+ piplist=($(pip search * | cut -d ' ' -f 1 | tr '[A-Z]' '[a-z]'))
fi
}
@@ -62,8 +62,13 @@ case "$words[1]" in
'(--no-install)--no-install[only download packages]' \
'(--no-download)--no-download[only install downloaded packages]' \
'(--install-option)--install-option[extra arguments to be supplied to the setup.py]' \
+ '(--single-version-externally-managed)--single-version-externally-managed[do not download/install dependencies. requires --record or --root]'\
+ '(--root)--root[treat this path as a fake chroot, installing into it. implies --single-version-externally-managed]'\
+ '(--record)--record[file to record all installed files to.]'\
+ '(-r --requirement)'{-r,--requirement}'[requirements file]: :_files'\
+ '(-e --editable)'{-e,--editable}'[path of or url to source to link to instead of installing.]: :_files -/'\
'1: :->packages' && return 0
-
+
if [[ "$state" == packages ]]; then
_pip_all
_wanted piplist expl 'packages' compadd -a piplist
diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh
index e6ad6450d..3bde154df 100644
--- a/plugins/rvm/rvm.plugin.zsh
+++ b/plugins/rvm/rvm.plugin.zsh
@@ -31,7 +31,7 @@ compdef _rb19 rb19
function rb20 {
if [ -z "$1" ]; then
- rvm use "$ruby"
+ rvm use "$ruby20"
else
rvm use "$ruby20@$1"
fi
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index 82faf87c9..72f56754c 100755
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -21,7 +21,8 @@ elif [[ $('uname') == 'Darwin' ]]; then
for _sublime_path in $_sublime_darwin_paths; do
if [[ -a $_sublime_path ]]; then
- alias st="'$_sublime_path'"
+ alias subl="'$_sublime_path'"
+ alias st=subl
break
fi
done
diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
index 3ecc2ac69..626c41f3d 100644
--- a/plugins/tmux/tmux.plugin.zsh
+++ b/plugins/tmux/tmux.plugin.zsh
@@ -1,3 +1,11 @@
+#
+# Aliases
+#
+
+alias ta='tmux attach -t'
+alias ts='tmux new-session -s'
+alias tl='tmux list-sessions'
+
# Only run if tmux is actually installed
if which tmux &> /dev/null
then
@@ -38,7 +46,7 @@ if which tmux &> /dev/null
fi
# Set the correct local config file to use.
- if [[ "$ZSH_TMUX_ITERM2" == "false" ]] && (( [[ -f $HOME/.tmux.conf ]] || -h $HOME/.tmux.conf ]] ))
+ if [[ "$ZSH_TMUX_ITERM2" == "false" ]] && [[ -f $HOME/.tmux.conf || -h $HOME/.tmux.conf ]]
then
#use this when they have a ~/.tmux.conf
export _ZSH_TMUX_FIXED_CONFIG="$zsh_tmux_plugin_path/tmux.extra.conf"
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index 6b6de2b15..8eedb90ee 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -11,7 +11,7 @@ function web_search() {
fi
# check whether the search engine is supported
- if [[ ! $1 =~ '(google|bing|yahoo)' ]];
+ if [[ ! $1 =~ '(google|bing|yahoo|duckduckgo)' ]];
then
echo "Search engine $1 not supported."
return 1
@@ -24,8 +24,12 @@ function web_search() {
$open_cmd "$url"
return
fi
-
- url="${url}/search?q="
+ if [[ $1 == 'duckduckgo' ]]; then
+ #slightly different search syntax for DDG
+ url="${url}/?q="
+ else
+ url="${url}/search?q="
+ fi
shift # shift out $1
while [[ $# -gt 0 ]]; do
@@ -34,10 +38,19 @@ function web_search() {
done
url="${url%?}" # remove the last '+'
-
+
$open_cmd "$url"
}
+
alias bing='web_search bing'
alias google='web_search google'
alias yahoo='web_search yahoo'
+alias ddg='web_search duckduckgo'
+#add your own !bang searches here
+alias wiki='web_search duckduckgo \!w'
+alias news='web_search duckduckgo \!n'
+alias youtube='web_search duckduckgo \!yt'
+alias map='web_search duckduckgo \!m'
+alias image='web_search duckduckgo \!i'
+alias ducky='web_search duckduckgo \!'
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index d4dded73a..1dfb6998c 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -14,7 +14,7 @@ ZSH_THEME="robbyrussell"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
-# Comment this out to disable bi-weekly auto-update checks
+# Uncomment this to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index c7a59ad0d..3ad4eff1f 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -137,7 +137,7 @@ prompt_dir() {
# Virtualenv: current working virtualenv
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
- if [[ -n $virtualenv_path ]]; then
+ if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
fi
}
diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
index 3eac14867..d624e3afc 100644
--- a/themes/gallois.zsh-theme
+++ b/themes/gallois.zsh-theme
@@ -7,12 +7,12 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
git_custom_status() {
local cb=$(current_branch)
if [ -n "$cb" ]; then
- echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
+ echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
#RVM and git settings
-if [[ -s ~/.rvm/scripts/rvm ]] ; then
+if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
else
if which rbenv &> /dev/null; then
diff --git a/themes/sunrise.zsh-theme b/themes/sunrise.zsh-theme
index 88b371d79..acc6ed312 100644
--- a/themes/sunrise.zsh-theme
+++ b/themes/sunrise.zsh-theme
@@ -5,16 +5,15 @@
#-------------------------------------------------------------------------------
# Color shortcuts
-R=$fg[red]
-G=$fg[green]
-M=$fg[magenta]
-RB=$fg_bold[red]
-YB=$fg_bold[yellow]
-BB=$fg_bold[blue]
+R=$fg_no_bold[red]
+G=$fg_no_bold[green]
+M=$fg_no_bold[magenta]
+Y=$fg_no_bold[yellow]
+B=$fg_no_bold[blue]
RESET=$reset_color
if [ "$(whoami)" = "root" ]; then
- PROMPTCOLOR="%{$RB%}" PREFIX="-!-";
+ PROMPTCOLOR="%{$R%}" PREFIX="-!-";
else
PROMPTCOLOR="" PREFIX="---";
fi
@@ -73,13 +72,14 @@ function custom_git_prompt() {
PROMPT='%B$PREFIX %2~ $(custom_git_prompt)%{$M%}%B»%b%{$RESET%} '
RPS1="${return_code}"
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$YB%}‹"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$YB%}›%{$RESET%} "
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$Y%}‹"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$Y%}›%{$RESET%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$R%}*"
ZSH_THEME_GIT_PROMPT_CLEAN=""
-ZSH_THEME_GIT_PROMPT_AHEAD="%{$BB%}➔"
+ZSH_THEME_GIT_PROMPT_AHEAD="%{$B%}➔"
+
ZSH_THEME_GIT_STATUS_PREFIX=" "
@@ -90,7 +90,7 @@ ZSH_THEME_GIT_PROMPT_STAGED_RENAMED="%{$G%}R"
ZSH_THEME_GIT_PROMPT_STAGED_DELETED="%{$G%}D"
# Not-staged
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$R%}⁇"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$R%}?"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$R%}M"
ZSH_THEME_GIT_PROMPT_DELETED="%{$R%}D"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$R%}UU"
diff --git a/tools/theme_chooser.sh b/tools/theme_chooser.sh
index 4d7047444..2c2a379ba 100755
--- a/tools/theme_chooser.sh
+++ b/tools/theme_chooser.sh
@@ -24,7 +24,8 @@ function theme_preview() {
THEME_NAME=`echo $THEME | sed s/\.zsh-theme$//`
print "$fg[blue]${(l.((${COLUMNS}-${#THEME_NAME}-5))..─.)}$reset_color $THEME_NAME $fg[blue]───$reset_color"
source "$THEMES_DIR/$THEME"
- print -P $PROMPT
+ cols=$(tput cols)
+ print -P "$PROMPT $RPROMPT"
}
function banner() {