summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/Soliah.zsh-theme11
-rw-r--r--themes/adben.zsh-theme35
-rw-r--r--themes/af-magic.zsh-theme15
-rw-r--r--themes/agnoster.zsh-theme36
-rw-r--r--themes/apple.zsh-theme1
-rw-r--r--themes/avit.zsh-theme71
-rw-r--r--themes/awesomepanda.zsh-theme8
-rw-r--r--themes/bureau.zsh-theme10
-rw-r--r--themes/candy-kingdom.zsh-theme9
-rw-r--r--themes/dieter.zsh-theme2
-rw-r--r--themes/dogenpunk.zsh-theme8
-rw-r--r--themes/duellj.zsh-theme1
-rw-r--r--themes/eastwood.zsh-theme4
-rw-r--r--themes/essembeh.zsh-theme1
-rw-r--r--themes/fino-time.zsh-theme4
-rw-r--r--themes/fino.zsh-theme9
-rw-r--r--themes/flazz.zsh-theme2
-rw-r--r--themes/fox.zsh-theme3
-rw-r--r--themes/gallois.zsh-theme16
-rw-r--r--themes/gianu.zsh-theme5
-rw-r--r--themes/gnzh.zsh-theme21
-rw-r--r--themes/half-life.zsh-theme11
-rw-r--r--themes/intheloop.zsh-theme3
-rw-r--r--themes/itchy.zsh-theme1
-rw-r--r--themes/jaischeema.zsh-theme9
-rw-r--r--themes/jispwoso.zsh-theme10
-rw-r--r--themes/jonathan.zsh-theme5
-rw-r--r--themes/juanghurtado.zsh-theme7
-rw-r--r--themes/junkfood.zsh-theme4
-rw-r--r--themes/kardan.zsh-theme2
-rw-r--r--themes/kolo.zsh-theme2
-rw-r--r--themes/kphoen.zsh-theme9
-rw-r--r--themes/linuxonly.zsh-theme1
-rw-r--r--themes/michelebologna.zsh-theme114
-rw-r--r--themes/mikeh.zsh-theme2
-rw-r--r--themes/minimal.zsh-theme12
-rw-r--r--themes/mira.zsh-theme29
-rw-r--r--themes/mortalscumbag.zsh-theme6
-rw-r--r--themes/obraun.zsh-theme2
-rw-r--r--themes/pure.zsh-theme22
-rw-r--r--themes/pygmalion.zsh-theme2
-rw-r--r--themes/re5et.zsh-theme2
-rw-r--r--themes/rixius.zsh-theme3
-rw-r--r--themes/rkj-repos.zsh-theme13
-rw-r--r--themes/simonoff.zsh-theme5
-rw-r--r--themes/smt.zsh-theme8
-rw-r--r--themes/sorin.zsh-theme10
-rw-r--r--themes/steeef.zsh-theme14
-rw-r--r--themes/strug.zsh-theme25
-rw-r--r--themes/sunrise.zsh-theme6
-rw-r--r--themes/superjarin.zsh-theme10
-rw-r--r--themes/terminalparty.zsh-theme3
-rw-r--r--themes/trapd00r.zsh-theme5
-rw-r--r--themes/ys.zsh-theme48
-rw-r--r--themes/zhann.zsh-theme2
55 files changed, 344 insertions, 335 deletions
diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme
index 237e70fda..070c54981 100644
--- a/themes/Soliah.zsh-theme
+++ b/themes/Soliah.zsh-theme
@@ -32,11 +32,12 @@ function check_git_prompt_info() {
# Determine if we are using a gemset.
function rvm_gemset() {
- GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
- if [[ -n $GEMSET ]]; then
- echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
- fi
-
+ if hash rvm 2>/dev/null; then
+ GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
+ if [[ -n $GEMSET ]]; then
+ echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
+ fi
+ fi
}
# Determine the time since last commit. If branch is clean,
diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
index b64714f32..e4774cf0e 100644
--- a/themes/adben.zsh-theme
+++ b/themes/adben.zsh-theme
@@ -2,12 +2,12 @@
# #
# # #README
# #
-# # This theme provides two customizable header functionalities :
+# # This theme provides two customizable header functionalities:
# # a) displaying a pseudo-random message from a database of quotations
# # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29)
-# # b) displaying randomly command line tips from The command line fu
+# # b) displaying randomly command line tips from The command line fu
# # (http://www.commandlinefu.com) community: in order to make use of this functionality
-# # you will need Internet connection.
+# # you will need Internet connection.
# # This theme provides as well information for the current user's context, like;
# # branch and status for the current version control system (git and svn currently
# # supported) and time, presented to the user in a non invasive volatile way.
@@ -25,11 +25,8 @@
# # -Solarized theme (https://github.com/altercation/solarized/)
# # -OS X: iTerm 2 (http://www.iterm2.com/)
# # -font Source code pro (https://github.com/adobe/source-code-pro)
-# #
-# # Author: Adolfo Benedetti
-# # email: adolfo.benedetti@gmail.com
-# # License: Public Domain
-# # This theme's look and feel is based on the Aaron Toponce's zsh theme , more info:
+# #
+# # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info:
# # http://pthree.org/2008/11/23/727/
# # enjoy!
########## COLOR ###########
@@ -45,7 +42,7 @@ GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN
GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} "
DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}"
VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}"
-Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
+VCS_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}"
# ########## COLOR ###########
# ########## SVN ###########
@@ -72,17 +69,17 @@ function precmd {
#Choose from all databases, regardless of whether they are considered "offensive"
fortune -a
}
- #obtains the tip
+ #obtains the tip
ps1_command_tip () {
wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d'
- }
+ }
prompt_header () {
if [[ "true" == "$ENABLE_COMMAND_TIP" ]]; then
ps1_command_tip
else
ps1_fortune
- fi
- }
+ fi
+ }
PROMPT_HEAD="${RED_START}${PR_YELLOW}$(prompt_header)${PR_RESET}"
# set a simple variable to show when in screen
if [[ -n "${WINDOW}" ]]; then
@@ -92,9 +89,8 @@ function precmd {
# Context: user@directory or just directory
prompt_context () {
- local user=`whoami`
- if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- echo -n "${PR_RESET}${PR_RED}$user@%m${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}"
+ if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
+ echo -n "${PR_RESET}${PR_RED}$USER@%m${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}"
else
echo -n "${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}"
fi
@@ -103,11 +99,8 @@ prompt_context () {
set_prompt () {
# required for the prompt
setopt prompt_subst
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -gt 8 ]]; then
- colors
- fi
-
+ autoload zsh/terminfo
+
# ######### PROMPT #########
PROMPT='${PROMPT_HEAD}
${RED_START}$(prompt_context)
diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
index 4cf282590..97d142a0f 100644
--- a/themes/af-magic.zsh-theme
+++ b/themes/af-magic.zsh-theme
@@ -1,14 +1,6 @@
# af-magic.zsh-theme
-#
-# Author: Andy Fleming
-# URL: http://andyfleming.com/
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
-#
-# Created on: June 19, 2012
-# Last modified on: June 20, 2012
-
-
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
@@ -27,7 +19,12 @@ eval my_gray='$FG[237]'
eval my_orange='$FG[214]'
# right prompt
-PROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
+if type "virtualenv_prompt_info" > /dev/null
+then
+ RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
+else
+ RPROMPT='$my_gray%n@%m%{$reset_color%}%'
+fi
# git settings
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 01cdc80e5..3a0c58b89 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -6,7 +6,7 @@
# # README
#
# In order for this theme to render correctly, you will need a
-# [Powerline-patched font](https://gist.github.com/1595572).
+# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
@@ -26,7 +26,13 @@
# A few utility functions to make it easy and re-usable to draw segmented prompts
CURRENT_BG='NONE'
-SEGMENT_SEPARATOR=''
+
+# Fix odd char on mac
+if [[ `uname` == 'Darwin' ]]; then
+ SEGMENT_SEPARATOR='\ue0b0'
+else
+ SEGMENT_SEPARATOR=''
+fi
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@@ -60,16 +66,16 @@ prompt_end() {
# Context: user@hostname (who am I and where am I)
prompt_context() {
- local user=`whoami`
-
- if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- prompt_segment black default "%(!.%{%F{yellow}%}.)$user@%m"
+ if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
+ prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
fi
}
# Git: branch/detached head, dirty status
prompt_git() {
- local ref dirty
+ local ref dirty mode repo_path
+ repo_path=$(git rev-parse --git-dir 2>/dev/null)
+
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
@@ -79,6 +85,14 @@ prompt_git() {
prompt_segment green black
fi
+ if [[ -e "${repo_path}/BISECT_LOG" ]]; then
+ mode=" <B>"
+ elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
+ mode=" >M<"
+ elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
+ mode=" >R>"
+ fi
+
setopt promptsubst
autoload -Uz vcs_info
@@ -88,9 +102,9 @@ prompt_git() {
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:git:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
- zstyle ':vcs_info:*' actionformats '%u%c'
+ zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
- echo -n "${ref/refs\/heads\//± }${vcs_info_msg_0_}"
+ echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}"
fi
}
@@ -115,10 +129,10 @@ prompt_hg() {
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
branch=$(hg id -b 2>/dev/null)
- if `hg st | grep -Eq "^\?"`; then
+ if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
- elif `hg st | grep -Eq "^(M|A)"`; then
+ elif `hg st | grep -q "^[MA]"`; then
prompt_segment yellow black
st='±'
else
diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme
index 275341dc6..95e6249fa 100644
--- a/themes/apple.zsh-theme
+++ b/themes/apple.zsh-theme
@@ -7,7 +7,6 @@ get_git_dirty() {
}
autoload -Uz vcs_info
-autoload -U colors && colors
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
index 51f5e375a..65466b82f 100644
--- a/themes/avit.zsh-theme
+++ b/themes/avit.zsh-theme
@@ -1,22 +1,4 @@
-#
-# Author:: Andrew Vit (<andrew@avit.ca>)
-#
# AVIT ZSH Theme
-#
-# Copyright 2011, Andrew Vit
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
PROMPT='
$(_user_host)${_current_dir} $(git_prompt_info) $(_ruby_version)
@@ -56,34 +38,32 @@ function _ruby_version() {
# Determine the time since last commit. If branch is clean,
# use a neutral color, otherwise colors will vary according to time.
function _git_time_since_commit() {
- if git rev-parse --git-dir > /dev/null 2>&1; then
- # Only proceed if there is actually a commit.
- if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
- # Get the last commit.
- last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
- now=$(date +%s)
- seconds_since_last_commit=$((now-last_commit))
-
- # Totals
- minutes=$((seconds_since_last_commit / 60))
- hours=$((seconds_since_last_commit/3600))
-
- # Sub-hours and sub-minutes
- days=$((seconds_since_last_commit / 86400))
- sub_hours=$((hours % 24))
- sub_minutes=$((minutes % 60))
-
- if [ $hours -gt 24 ]; then
- commit_age="${days}d"
- elif [ $minutes -gt 60 ]; then
- commit_age="${sub_hours}h${sub_minutes}m"
- else
- commit_age="${minutes}m"
- fi
-
- color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
- echo "$color$commit_age%{$reset_color%}"
+# Only proceed if there is actually a commit.
+ if git log -1 > /dev/null 2>&1; then
+ # Get the last commit.
+ last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
+ now=$(date +%s)
+ seconds_since_last_commit=$((now-last_commit))
+
+ # Totals
+ minutes=$((seconds_since_last_commit / 60))
+ hours=$((seconds_since_last_commit/3600))
+
+ # Sub-hours and sub-minutes
+ days=$((seconds_since_last_commit / 86400))
+ sub_hours=$((hours % 24))
+ sub_minutes=$((minutes % 60))
+
+ if [ $hours -gt 24 ]; then
+ commit_age="${days}d"
+ elif [ $minutes -gt 60 ]; then
+ commit_age="${sub_hours}h${sub_minutes}m"
+ else
+ commit_age="${minutes}m"
fi
+
+ color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
+ echo "$color$commit_age%{$reset_color%}"
fi
}
@@ -117,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}"
export LSCOLORS="exfxcxdxbxegedabagacad"
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
export GREP_COLOR='1;33'
-
diff --git a/themes/awesomepanda.zsh-theme b/themes/awesomepanda.zsh-theme
index 411b89837..1c5d06b2d 100644
--- a/themes/awesomepanda.zsh-theme
+++ b/themes/awesomepanda.zsh-theme
@@ -1,18 +1,16 @@
# the svn plugin has to be activated for this to work.
-
-PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
+local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
+PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) "
-
-
ZSH_PROMPT_BASE_COLOR="%{$fg_bold[blue]%}"
ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}"
ZSH_THEME_SVN_PROMPT_PREFIX="svn:("
ZSH_THEME_SVN_PROMPT_SUFFIX=")"
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}"
-ZSH_THEME_SVN_PROMPT_CLEAN=" " \ No newline at end of file
+ZSH_THEME_SVN_PROMPT_CLEAN=" "
diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
index 1d88f54d0..148abec10 100644
--- a/themes/bureau.zsh-theme
+++ b/themes/bureau.zsh-theme
@@ -31,7 +31,7 @@ bureau_git_status () {
if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
- if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then
+ if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
@@ -70,7 +70,7 @@ bureau_git_prompt () {
_PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
-if [[ "%#" == "#" ]]; then
+if [[ $EUID -eq 0 ]]; then
_USERNAME="%{$fg_bold[red]%}%n"
_LIBERTY="%{$fg[red]%}#"
else
@@ -101,12 +101,12 @@ _1RIGHT="[%*] "
bureau_precmd () {
_1SPACES=`get_space $_1LEFT $_1RIGHT`
- echo
+ print
+ print -rP "$_1LEFT$_1SPACES$_1RIGHT"
}
setopt prompt_subst
-PROMPT='$_1LEFT$_1SPACES$_1RIGHT
-> $_LIBERTY '
+PROMPT='> $_LIBERTY '
RPROMPT='$(nvm_prompt_info) $(bureau_git_prompt)'
autoload -U add-zsh-hook
diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme
index 25aeb6597..adba1ad39 100644
--- a/themes/candy-kingdom.zsh-theme
+++ b/themes/candy-kingdom.zsh-theme
@@ -1,11 +1,4 @@
# neuralsanwich.zsh-theme
-#
-# Author: Sean Jones
-# URL: http://www.neuralsandwich.com
-# Repo:
-# Direct link:
-# Create:
-# Modified:
if [ "x$OH_MY_ZSH_HG" = "x" ]; then
OH_MY_ZSH_HG="hg"
@@ -20,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}
PROMPT='
diff --git a/themes/dieter.zsh-theme b/themes/dieter.zsh-theme
index 0a5e9265b..58d9f88a9 100644
--- a/themes/dieter.zsh-theme
+++ b/themes/dieter.zsh-theme
@@ -21,7 +21,7 @@ local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
# Hostname part. compressed and colorcoded per host_repr array
# if not found, regular hostname in default color
-local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
+local host="@${host_repr[$HOST]:-$HOST}%{$reset_color%}"
# Compacted $PWD
local pwd="%{$fg[blue]%}%c%{$reset_color%}"
diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme
index f4d65ab74..0bd38acc2 100644
--- a/themes/dogenpunk.zsh-theme
+++ b/themes/dogenpunk.zsh-theme
@@ -1,10 +1,4 @@
-# -----------------------------------------------------------------------------
-# FILE: dogenpunk.zsh-theme
-# DESCRIPTION: oh-my-zsh theme file.
-# AUTHOR: Matthew Nelson (dogenpunk@gmail.com)
-# VERSION: 0.1
-# SCREENSHOT: coming soon
-# -----------------------------------------------------------------------------
+# dogenpunk.zsh-theme
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
diff --git a/themes/duellj.zsh-theme b/themes/duellj.zsh-theme
index 7350b4335..3849c35be 100644
--- a/themes/duellj.zsh-theme
+++ b/themes/duellj.zsh-theme
@@ -1,4 +1,3 @@
-
# user, host, full path, and time/date
# on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
diff --git a/themes/eastwood.zsh-theme b/themes/eastwood.zsh-theme
index db2529990..1b284cdc2 100644
--- a/themes/eastwood.zsh-theme
+++ b/themes/eastwood.zsh-theme
@@ -1,4 +1,4 @@
-#RVM settings
+# RVM settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
else
@@ -12,7 +12,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
-#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
+# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(current_branch)
if [ -n "$cb" ]; then
diff --git a/themes/essembeh.zsh-theme b/themes/essembeh.zsh-theme
index 8c98ea1ed..939bb7a4c 100644
--- a/themes/essembeh.zsh-theme
+++ b/themes/essembeh.zsh-theme
@@ -1,7 +1,6 @@
# Theme with full path names and hostname
# Handy if you work on different servers all the time;
-
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
function my_git_prompt_info() {
diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
index 7154e09f1..6e7e654ff 100644
--- a/themes/fino-time.zsh-theme
+++ b/themes/fino-time.zsh-theme
@@ -1,4 +1,4 @@
-# Fino-time theme by Aexander Berezovsky (http://berezovsky.me) based on Fino by Max Masnick (http://max.masnick.me)
+# fino-time.zsh-theme
# Use with a dark background and 256-color terminal!
# Meant for people with RVM and git. Tested only on OS X 10.7.
@@ -21,7 +21,7 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}
diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
index 4c7aabcff..e4477589e 100644
--- a/themes/fino.zsh-theme
+++ b/themes/fino.zsh-theme
@@ -1,4 +1,4 @@
-# Fino theme by Max Masnick (http://max.masnick.me)
+# fino.zsh-theme
# Use with a dark background and 256-color terminal!
# Meant for people with rbenv and git. Tested only on OS X 10.7.
@@ -11,14 +11,13 @@
#
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
-
function prompt_char {
git branch >/dev/null 2>/dev/null && echo "±" && return
echo '○'
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}
local ruby_env=''
@@ -36,9 +35,9 @@ local prompt_char='$(prompt_char)'
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env}
-╰─${prompt_char} "
+╰─${prompt_char}%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
-ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔" \ No newline at end of file
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
diff --git a/themes/flazz.zsh-theme b/themes/flazz.zsh-theme
index 280794f2b..c0a7fb5d0 100644
--- a/themes/flazz.zsh-theme
+++ b/themes/flazz.zsh-theme
@@ -1,4 +1,4 @@
-if [ "$(whoami)" = "root" ]
+if [ "$USER" = "root" ]
then CARETCOLOR="red"
else CARETCOLOR="blue"
fi
diff --git a/themes/fox.zsh-theme b/themes/fox.zsh-theme
index 1959853cf..3ecd4e204 100644
--- a/themes/fox.zsh-theme
+++ b/themes/fox.zsh-theme
@@ -1,4 +1,5 @@
-#fox theme
+# fox.zsh-theme
+
PROMPT='%{$fg[cyan]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[cyan]%}☮%{$fg_bold[white]%}%M%{$reset_color%}%{$fg[cyan]%}]%{$fg[white]%}-%{$fg[cyan]%}(%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[cyan]%})$(git_prompt_info)
└> % %{$reset_color%}'
diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
index d624e3afc..d383ed583 100644
--- a/themes/gallois.zsh-theme
+++ b/themes/gallois.zsh-theme
@@ -11,15 +11,11 @@ git_custom_status() {
fi
}
-#RVM and git settings
-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
- RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1'
- else
- RPS1='$(git_custom_status) $EPS1'
- fi
-fi
+# RVM component of prompt
+ZSH_THEME_RVM_PROMPT_PREFIX="%{$fg[red]%}["
+ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}"
+
+# Combine it all into a final right-side prompt
+RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1'
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
diff --git a/themes/gianu.zsh-theme b/themes/gianu.zsh-theme
index c7fe40665..faa80218e 100644
--- a/themes/gianu.zsh-theme
+++ b/themes/gianu.zsh-theme
@@ -1,8 +1,3 @@
-# Oh-my-Zsh prompt created by gianu
-#
-# github.com/gianu
-# sgianazza@gmail.com
-
PROMPT='[%{$fg_bold[white]%}%n%{$reset_color%}@%{$fg_bold[red]%}%m%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%{$reset_color%}]$ '
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[green]%}"
diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index 3c6b8a409..ab154c1e5 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -2,11 +2,10 @@
# Based on bira theme
# load some modules
-autoload -U colors zsh/terminfo # Used in the colour alias below
-colors
+autoload -U zsh/terminfo # Used in the colour alias below
setopt prompt_subst
-# make some aliases for the colours: (coud use normal escap.seq's too)
+# make some aliases for the colours: (could use normal escape sequences too)
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$fg[${(L)color}]%}'
done
@@ -14,18 +13,18 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
eval PR_BOLD="%{$terminfo[bold]%}"
# Check the UID
-if [[ $UID -ge 1000 ]]; then # normal user
+if [[ $UID -ne 0 ]]; then # normal user
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
-elif [[ $UID -eq 0 ]]; then # root
+else # root
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
fi
# Check if we are on SSH or not
-if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
+if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH
else
eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH
@@ -36,12 +35,12 @@ local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
local rvm_ruby=''
-if which rvm-prompt &> /dev/null; then
+if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect local user rvm installation
+ rvm_ruby='%{$PR_RED%}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
+elif which rvm-prompt &> /dev/null; then # detect sysem-wide rvm installation
rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
-else
- if which rbenv &> /dev/null; then
- rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
- fi
+elif which rbenv &> /dev/null; then # detect Simple Ruby Version management
+ rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
fi
local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}'
diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
index c8d09ce47..a3c505706 100644
--- a/themes/half-life.zsh-theme
+++ b/themes/half-life.zsh-theme
@@ -13,8 +13,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
@@ -51,8 +49,8 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
PR_RST="%{${reset_color}%}"
FMT_BRANCH=" on %{$turquoise%}%b%u%c${PR_RST}"
FMT_ACTION=" performing a %{$limegreen%}%a${PR_RST}"
-FMT_UNSTAGED="%{$orange%}●"
-FMT_STAGED="%{$limegreen%}●"
+FMT_UNSTAGED="%{$orange%} ●"
+FMT_STAGED="%{$limegreen%} ●"
zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}"
zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}"
@@ -83,7 +81,7 @@ function steeef_precmd {
# check for untracked files or updated submodules, since vcs_info doesn't
if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
PR_GIT_UPDATE=1
- FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST}"
+ FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%} ●${PR_RST}"
else
FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c${PR_RST}"
fi
@@ -95,5 +93,4 @@ function steeef_precmd {
}
add-zsh-hook precmd steeef_precmd
-PROMPT=$'
-%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
+PROMPT=$'%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
diff --git a/themes/intheloop.zsh-theme b/themes/intheloop.zsh-theme
index 85b4a4d95..7a98db27a 100644
--- a/themes/intheloop.zsh-theme
+++ b/themes/intheloop.zsh-theme
@@ -1,4 +1,3 @@
-# ZSH theme by James Smith (http://loopj.com)
# A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
@@ -21,4 +20,4 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}) %{$fg[yellow]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}↓%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}↑%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}" \ No newline at end of file
+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}"
diff --git a/themes/itchy.zsh-theme b/themes/itchy.zsh-theme
index afc2abf69..c23889edf 100644
--- a/themes/itchy.zsh-theme
+++ b/themes/itchy.zsh-theme
@@ -1,4 +1,3 @@
-# Created by Daniel Bayerlein https://github.com/danielbayerlein
# Inspired by http://peepcode.com/blog/2012/my-command-line-prompt
local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
diff --git a/themes/jaischeema.zsh-theme b/themes/jaischeema.zsh-theme
index aecc5b961..da1dd1e5d 100644
--- a/themes/jaischeema.zsh-theme
+++ b/themes/jaischeema.zsh-theme
@@ -1,11 +1,4 @@
-# ------------------------------------------------------------------------------
-# FILE: jaischeema.zsh-theme
-# DESCRIPTION: oh-my-zsh theme file.
-# AUTHOR: Jais Cheema
-# VERSION: 0.0.1
-# ------------------------------------------------------------------------------
-
-
+# jaischeema.zsh-theme
PROMPT='%{$fg_bold[magenta]%}%m%{$reset_color%} at %{$fg_bold[green]%}%~%{$reset_color%} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}%{$fg[red]%}❯%{$reset_color%} '
diff --git a/themes/jispwoso.zsh-theme b/themes/jispwoso.zsh-theme
index cdfef3871..748430573 100644
--- a/themes/jispwoso.zsh-theme
+++ b/themes/jispwoso.zsh-theme
@@ -1,4 +1,10 @@
-PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/%{$reset_color%}
-%{$fg_bold[red]%}➜ %{$reset_color%} '
+local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
+PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/ %{$reset_color%}%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}
+${ret_status} %{$reset_color%} '
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
index bca92970c..2f0e77431 100644
--- a/themes/jonathan.zsh-theme
+++ b/themes/jonathan.zsh-theme
@@ -44,10 +44,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
diff --git a/themes/juanghurtado.zsh-theme b/themes/juanghurtado.zsh-theme
index 2f715cc9e..bc470e838 100644
--- a/themes/juanghurtado.zsh-theme
+++ b/themes/juanghurtado.zsh-theme
@@ -1,7 +1,4 @@
-# ------------------------------------------------------------------------
-# Juan G. Hurtado oh-my-zsh theme
-# (Needs Git plugin for current_branch method)
-# ------------------------------------------------------------------------
+# Needs Git plugin for current_branch method
# Color shortcuts
RED=$fg[red]
@@ -43,4 +40,4 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
PROMPT='
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
%{$BLUE%}>%{$RESET_COLOR%} '
-RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}' \ No newline at end of file
+RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
diff --git a/themes/junkfood.zsh-theme b/themes/junkfood.zsh-theme
index 57b4070dc..01fae4b95 100644
--- a/themes/junkfood.zsh-theme
+++ b/themes/junkfood.zsh-theme
@@ -1,8 +1,4 @@
-# ------------------------------------------------------------------------
-# Tyler Cipriani
-# oh-my-zsh theme
# Totally ripped off Dallas theme
-# ------------------------------------------------------------------------
# Grab the current date (%W) and time (%t):
JUNKFOOD_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}"
diff --git a/themes/kardan.zsh-theme b/themes/kardan.zsh-theme
index fd6586a9d..9a3d59109 100644
--- a/themes/kardan.zsh-theme
+++ b/themes/kardan.zsh-theme
@@ -1,7 +1,7 @@
# Simple theme based on my old zsh settings.
function get_host {
- echo '@'`hostname`''
+ echo '@'$HOST
}
PROMPT='> '
diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme
index e743289c3..51b0af724 100644
--- a/themes/kolo.zsh-theme
+++ b/themes/kolo.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
diff --git a/themes/kphoen.zsh-theme b/themes/kphoen.zsh-theme
index 0e9b5e73c..8e8894a34 100644
--- a/themes/kphoen.zsh-theme
+++ b/themes/kphoen.zsh-theme
@@ -1,11 +1,4 @@
-# ------------------------------------------------------------------------------
-# FILE: kphoen.zsh-theme
-# DESCRIPTION: oh-my-zsh theme file.
-# AUTHOR: Kévin Gomez (geek63@gmail.com)
-# VERSION: 1.0.0
-# SCREENSHOT:
-# ------------------------------------------------------------------------------
-
+# kphoen.zsh-theme
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)]
diff --git a/themes/linuxonly.zsh-theme b/themes/linuxonly.zsh-theme
index a11b80d7f..f9e0aa07d 100644
--- a/themes/linuxonly.zsh-theme
+++ b/themes/linuxonly.zsh-theme
@@ -13,7 +13,6 @@ local c7=$(printf "\033[38;5;149m")
local c8=$(printf "\033[38;5;126m")
local c9=$(printf "\033[38;5;162m")
-local foopath=$(perl /home/scp1/bin/foopath)
if [ "$TERM" = "linux" ]; then
c1=$(printf "\033[34;1m")
diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
index ef4c6d740..fec243873 100644
--- a/themes/michelebologna.zsh-theme
+++ b/themes/michelebologna.zsh-theme
@@ -1,44 +1,74 @@
-# 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="("
+# Michele Bologna's theme
+# http://michelebologna.net
+#
+# This a theme for oh-my-zsh. Features a colored prompt with:
+# * username@host: [jobs] [git] workdir %
+# * hostname color is based on hostname characters. When using as root, the
+# prompt shows only the hostname in red color.
+# * [jobs], if applicable, counts the number of suspended jobs tty
+# * [git], if applicable, represents the status of your git repo (more on that
+# later)
+# * '%' prompt will be green if last command return value is 0, yellow otherwise.
+#
+# git prompt is inspired by official git contrib prompt:
+# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
+# and it adds:
+# * the current branch
+# * '%' if there are untracked files
+# * '$' if there are stashed changes
+# * '*' if there are modified files
+# * '+' if there are added files
+# * '<' if local repo is behind remote repo
+# * '>' if local repo is ahead remote repo
+# * '=' if local repo is equal to remote repo (in sync)
+# * '<>' if local repo is diverged
+
+local green="%{$fg_bold[green]%}"
+local red="%{$fg_bold[red]%}"
+local cyan="%{$fg_bold[cyan]%}"
+local yellow="%{$fg_bold[yellow]%}"
+local blue="%{$fg_bold[blue]%}"
+local magenta="%{$fg_bold[magenta]%}"
+local white="%{$fg_bold[white]%}"
+local reset="%{$reset_color%}"
+
+local -a color_array
+color_array=($green $red $cyan $yellow $blue $magenta $white)
+
+local username_normal_color=$white
+local username_root_color=$red
+local hostname_root_color=$red
+
+# calculating hostname color with hostname characters
+for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]]
+local -a hostname_color
+hostname_color=%(!.$hostname_root_color.$hostname_normal_color)
+
+local current_dir_color=$blue
+local username_command="%n"
+local hostname_command="%m"
+local current_dir="%~"
+
+local username_output="%(!..$username_normal_color$username_command$reset@)"
+local hostname_output="$hostname_color$hostname_command$reset"
+local current_dir_output="$current_dir_color$current_dir$reset"
+local jobs_bg="${red}fg: %j$reset"
+local last_command_output="%(?.%(!.$red.$green).$yellow)"
+
+ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
-ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
-ZSH_THEME_GIT_PROMPT_CLEAN=")"
+ZSH_THEME_GIT_PROMPT_DIRTY=""
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
+ZSH_THEME_GIT_PROMPT_MODIFIED="*"
+ZSH_THEME_GIT_PROMPT_ADDED="+"
+ZSH_THEME_GIT_PROMPT_STASHED="$"
+ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="="
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>"
-# 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 [%@]'
+PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
+PROMPT+='$(__git_ps1)'
+PROMPT+=" $last_command_output%#$reset "
+RPROMPT=''
diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme
index 943f04d38..a95383ba5 100644
--- a/themes/mikeh.zsh-theme
+++ b/themes/mikeh.zsh-theme
@@ -1,6 +1,4 @@
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
diff --git a/themes/minimal.zsh-theme b/themes/minimal.zsh-theme
index a2a16031f..e05df9c9b 100644
--- a/themes/minimal.zsh-theme
+++ b/themes/minimal.zsh-theme
@@ -1,18 +1,24 @@
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
+ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
+ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
+ZSH_THEME_HG_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
+ZSH_THEME_HG_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
vcs_status() {
- if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then
+ if [[ $(whence in_svn) != "" ]] && in_svn; then
svn_prompt_info
+ elif [[ $(whence in_hg) != "" ]] && in_hg; then
+ hg_prompt_info
else
git_prompt_info
fi
}
-PROMPT='%2~ $(vcs_status)»%b ' \ No newline at end of file
+PROMPT='%2~ $(vcs_status)»%b '
diff --git a/themes/mira.zsh-theme b/themes/mira.zsh-theme
new file mode 100644
index 000000000..e6c952998
--- /dev/null
+++ b/themes/mira.zsh-theme
@@ -0,0 +1,29 @@
+# Based on bira zsh theme with nvm, rvm and jenv support
+local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
+
+local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
+local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
+
+local rvm_ruby=''
+if which rvm-prompt &> /dev/null; then
+ rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
+else
+ if which rbenv &> /dev/null; then
+ rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
+ fi
+fi
+
+local nvm_node=''
+nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
+
+local jenv_java=''
+jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
+
+local git_branch='$(git_prompt_info)%{$reset_color%}'
+
+PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
+╰─%B$%b "
+RPS1="${return_code}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
+ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme
index 5dbf2e4f6..ccce4197a 100644
--- a/themes/mortalscumbag.zsh-theme
+++ b/themes/mortalscumbag.zsh-theme
@@ -10,12 +10,12 @@ function my_git_prompt() {
fi
# is anything staged?
- if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
fi
# is anything unstaged?
- if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
@@ -25,7 +25,7 @@ function my_git_prompt() {
fi
# is anything unmerged?
- if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
diff --git a/themes/obraun.zsh-theme b/themes/obraun.zsh-theme
index 08d137665..7af44056f 100644
--- a/themes/obraun.zsh-theme
+++ b/themes/obraun.zsh-theme
@@ -1,4 +1,4 @@
-if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
+if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
diff --git a/themes/pure.zsh-theme b/themes/pure.zsh-theme
index d7ed624e4..1473194a5 100644
--- a/themes/pure.zsh-theme
+++ b/themes/pure.zsh-theme
@@ -18,28 +18,6 @@
# Github: https://github.com/nicoulaj
# Twitter: https://twitter.com/nicoulaj
#
-# License
-#
-# Copyright (c) 2013 Kasper Kronborg Isager
-#
-# 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.
-#
# ------------------------------------------------------------------------------
# Set required options
diff --git a/themes/pygmalion.zsh-theme b/themes/pygmalion.zsh-theme
index 654e0fc37..5f5fe7f9a 100644
--- a/themes/pygmalion.zsh-theme
+++ b/themes/pygmalion.zsh-theme
@@ -12,7 +12,7 @@ prompt_setup_pygmalion(){
base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
- add-zsh-hook precmd prompt_pygmalion_precmd
+ precmd_functions+=(prompt_pygmalion_precmd)
}
prompt_pygmalion_precmd(){
diff --git a/themes/re5et.zsh-theme b/themes/re5et.zsh-theme
index 5bded76a3..95af1e2ee 100644
--- a/themes/re5et.zsh-theme
+++ b/themes/re5et.zsh-theme
@@ -1,4 +1,4 @@
-if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi
+if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
diff --git a/themes/rixius.zsh-theme b/themes/rixius.zsh-theme
index c0c5c9c71..b33f23e1c 100644
--- a/themes/rixius.zsh-theme
+++ b/themes/rixius.zsh-theme
@@ -1,6 +1,3 @@
-# /|/ Code by Stephen
-# /|/ "Rixius" Middleton
-#
# name in folder (github)
# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
function collapse_pwd {
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index 4ab3bc757..a3f1f3dfa 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -4,7 +4,7 @@
function hg_prompt_info {
hg prompt --angle-brackets "\
-<hg:%{$fg[magenta]%}<branch>%{$reset_color%}>\
+<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
@@ -15,11 +15,16 @@ ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}✱"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✗"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}➦"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂"
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}✈"
+ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[blue]%}"
+ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
function mygit() {
- ref=$(git symbolic-ref HEAD 2> /dev/null) || return
- echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX"
+ if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
+ ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
+ ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_short_sha)$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX "
+ fi
}
function retcode() {}
diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme
index fb4d32e24..63ce4261b 100644
--- a/themes/simonoff.zsh-theme
+++ b/themes/simonoff.zsh-theme
@@ -63,10 +63,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
diff --git a/themes/smt.zsh-theme b/themes/smt.zsh-theme
index bbd1031e1..f2b0526b7 100644
--- a/themes/smt.zsh-theme
+++ b/themes/smt.zsh-theme
@@ -1,10 +1,4 @@
-# -----------------------------------------------------------------------------
-# FILE: smt.zsh-theme
-# DESCRIPTION: oh-my-zsh theme file, based on dogenpunk by Matthew Nelson.
-# AUTHOR: Stephen Tudor (stephen@tudorstudio.com
-# VERSION: 0.1
-# SCREENSHOT: coming soon
-# -----------------------------------------------------------------------------
+# smt.zsh-theme, based on dogenpunk by Matthew Nelson.
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%} "
diff --git a/themes/sorin.zsh-theme b/themes/sorin.zsh-theme
index 601dbe5d7..ac6a49840 100644
--- a/themes/sorin.zsh-theme
+++ b/themes/sorin.zsh-theme
@@ -1,11 +1,5 @@
-# ------------------------------------------------------------------------------
-# FILE: sorin.zsh-theme
-# DESCRIPTION: oh-my-zsh theme file.
-# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com)
-# VERSION: 1.0.2
-# SCREENSHOT: http://i.imgur.com/aipDQ.png
-# ------------------------------------------------------------------------------
-
+# sorin.zsh-theme
+# screenshot: http://i.imgur.com/aipDQ.png
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index 312229e9f..13728ca9a 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -7,14 +7,14 @@
# git untracked files modification from Brian Carper:
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
+export VIRTUAL_ENV_DISABLE_PROMPT=1
+
function virtualenv_info {
- [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
+ [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
}
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
@@ -81,13 +81,13 @@ add-zsh-hook chpwd steeef_chpwd
function steeef_precmd {
if [[ -n "$PR_GIT_UPDATE" ]] ; then
# check for untracked files or updated submodules, since vcs_info doesn't
- if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then
+ if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then
PR_GIT_UPDATE=1
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
else
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
fi
- zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}"
+ zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH} "
vcs_info 'prompt'
PR_GIT_UPDATE=
@@ -96,5 +96,5 @@ function steeef_precmd {
add-zsh-hook precmd steeef_precmd
PROMPT=$'
-%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_
-$(virtualenv_info)$ '
+%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_$(virtualenv_info)%{$reset_color%}
+$ '
diff --git a/themes/strug.zsh-theme b/themes/strug.zsh-theme
new file mode 100644
index 000000000..89b56b008
--- /dev/null
+++ b/themes/strug.zsh-theme
@@ -0,0 +1,25 @@
+# terminal coloring
+export CLICOLOR=1
+export LSCOLORS=dxFxCxDxBxegedabagacad
+
+local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
+
+PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
+%{$fg[green]%}╰\$ %{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
+
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
+
diff --git a/themes/sunrise.zsh-theme b/themes/sunrise.zsh-theme
index acc6ed312..28befd01b 100644
--- a/themes/sunrise.zsh-theme
+++ b/themes/sunrise.zsh-theme
@@ -1,8 +1,6 @@
-#-------------------------------------------------------------------------------
-# Sunrise theme for oh-my-zsh by Adam Lindberg (eproxus@gmail.com)
+# Sunrise theme for oh-my-zsh
# Intended to be used with Solarized: http://ethanschoonover.com/solarized
# (Needs Git plugin for current_branch method)
-#-------------------------------------------------------------------------------
# Color shortcuts
R=$fg_no_bold[red]
@@ -12,7 +10,7 @@ Y=$fg_no_bold[yellow]
B=$fg_no_bold[blue]
RESET=$reset_color
-if [ "$(whoami)" = "root" ]; then
+if [ "$USER" = "root" ]; then
PROMPTCOLOR="%{$R%}" PREFIX="-!-";
else
PROMPTCOLOR="" PREFIX="---";
diff --git a/themes/superjarin.zsh-theme b/themes/superjarin.zsh-theme
index 2920d17a2..86fa9c706 100644
--- a/themes/superjarin.zsh-theme
+++ b/themes/superjarin.zsh-theme
@@ -1,11 +1,5 @@
-# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
-if [ -e ~/.rvm/bin/rvm-prompt ]; then
- JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
-else
- if which rbenv &> /dev/null; then
- JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
- fi
-fi
+# Grab the current version of ruby in use: [ruby-1.8.7]
+JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(ruby_prompt_info)%{$fg[white]%}]%{$reset_color%}"
# Grab the current filepath, use shortcuts: ~/Desktop
# Append the current git branch, if in a git repository
diff --git a/themes/terminalparty.zsh-theme b/themes/terminalparty.zsh-theme
index 216ce37eb..cd7370bba 100644
--- a/themes/terminalparty.zsh-theme
+++ b/themes/terminalparty.zsh-theme
@@ -1,4 +1,4 @@
-PROMPT='%{$fg[green]%} %% '
+PROMPT='%(?,%{$fg[green]%},%{$fg[red]%}) %% '
# RPS1='%{$fg[blue]%}%~%{$reset_color%} '
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}'
@@ -6,4 +6,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}"
-
diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
index cba14c42c..ca1676fb5 100644
--- a/themes/trapd00r.zsh-theme
+++ b/themes/trapd00r.zsh-theme
@@ -1,5 +1,4 @@
-# Name: trapd00r zsh theme
-# Author: Magnus Woldrich <m@japh.se>
+# trapd00r.zsh-theme
#
# This theme needs a terminal supporting 256 colors as well as unicode. It also
# needs the script that splits up the current path and makes it fancy as located
@@ -87,7 +86,7 @@ prompt_jnrowe_precmd () {
else
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='${vcs_info_msg_0_}
-%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
+%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
fi
}
diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
index 43c101c2a..fd8adc41e 100644
--- a/themes/ys.zsh-theme
+++ b/themes/ys.zsh-theme
@@ -8,18 +8,41 @@
# Machine name.
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || hostname
+ [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
}
# Directory info.
local current_dir='${PWD/#$HOME/~}'
+# VCS
+YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
+YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
+YS_VCS_PROMPT_SUFFIX="%{$reset_color%}"
+YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x"
+YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o"
+
# Git info.
local git_info='$(git_prompt_info)'
-ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x"
-ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o"
+ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
+ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
+ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
+
+# HG info
+local hg_info='$(ys_hg_prompt_info)'
+ys_hg_prompt_info() {
+ # make sure this is a hg dir
+ if [ -d '.hg' ]; then
+ echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"
+ echo -n $(hg branch 2>/dev/null)
+ if [ -n "$(hg status 2>/dev/null)" ]; then
+ echo -n "$YS_VCS_PROMPT_DIRTY"
+ else
+ echo -n "$YS_VCS_PROMPT_CLEAN"
+ fi
+ echo -n "$YS_VCS_PROMPT_SUFFIX"
+ fi
+}
# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $
PROMPT="
@@ -29,6 +52,21 @@ PROMPT="
%{$fg[green]%}$(box_name) \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
+${hg_info}\
+${git_info} \
+%{$fg[white]%}[%*]
+%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
+
+if [[ "$USER" == "root" ]]; then
+PROMPT="
+%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
+%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
+%{$fg[white]%}at \
+%{$fg[green]%}$(box_name) \
+%{$fg[white]%}in \
+%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
+${hg_info}\
${git_info} \
%{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
+fi
diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme
index 5c0854730..27597ec6c 100644
--- a/themes/zhann.zsh-theme
+++ b/themes/zhann.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'