summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/3den.zsh-theme2
-rw-r--r--themes/adben.zsh-theme8
-rw-r--r--themes/af-magic.zsh-theme47
-rw-r--r--themes/agnoster.zsh-theme110
-rw-r--r--themes/alanpeabody.zsh-theme14
-rw-r--r--themes/amuse.zsh-theme23
-rw-r--r--themes/arrow.zsh-theme2
-rw-r--r--themes/avit.zsh-theme99
-rw-r--r--themes/bira.zsh-theme37
-rw-r--r--themes/bureau.zsh-theme54
-rw-r--r--themes/candy-kingdom.zsh-theme28
-rw-r--r--themes/candy.zsh-theme2
-rw-r--r--themes/clean.zsh-theme2
-rw-r--r--themes/cloud.zsh-theme4
-rw-r--r--themes/crcandy.zsh-theme2
-rw-r--r--themes/crunch.zsh-theme10
-rw-r--r--themes/cypher.zsh-theme2
-rw-r--r--themes/dallas.zsh-theme13
-rw-r--r--themes/dogenpunk.zsh-theme4
-rw-r--r--themes/dst.zsh-theme2
-rw-r--r--themes/dstufft.zsh-theme2
-rw-r--r--themes/duellj.zsh-theme2
-rw-r--r--themes/eastwood.zsh-theme4
-rw-r--r--themes/emotty.zsh-theme103
-rw-r--r--themes/evan.zsh-theme4
-rw-r--r--themes/example.zsh-theme5
-rw-r--r--themes/fino-time.zsh-theme9
-rw-r--r--themes/fino.zsh-theme17
-rw-r--r--themes/fishy.zsh-theme14
-rw-r--r--themes/frontcube.zsh-theme5
-rw-r--r--themes/funky.zsh-theme4
-rw-r--r--themes/gallifrey.zsh-theme9
-rw-r--r--themes/gallois.zsh-theme10
-rw-r--r--themes/gentoo.zsh-theme2
-rw-r--r--themes/gnzh.zsh-theme60
-rw-r--r--themes/half-life.zsh-theme8
-rw-r--r--themes/itchy.zsh-theme6
-rw-r--r--themes/jaischeema.zsh-theme10
-rw-r--r--themes/josh.zsh-theme4
-rw-r--r--themes/jreese.zsh-theme2
-rw-r--r--themes/juanghurtado.zsh-theme4
-rw-r--r--themes/kennethreitz.zsh-theme8
-rw-r--r--themes/kiwi.zsh-theme4
-rw-r--r--themes/lambda.zsh-theme2
-rw-r--r--themes/lukerandall.zsh-theme2
l---------[-rw-r--r--]themes/macovsky-ruby.zsh-theme16
-rw-r--r--themes/macovsky.zsh-theme16
-rw-r--r--themes/maran.zsh-theme2
-rw-r--r--themes/mh.zsh-theme4
-rw-r--r--themes/michelebologna.zsh-theme115
-rw-r--r--themes/mikeh.zsh-theme4
-rw-r--r--themes/minimal.zsh-theme12
-rw-r--r--themes/mira.zsh-theme20
-rw-r--r--themes/mortalscumbag.zsh-theme10
-rw-r--r--themes/muse.zsh-theme7
-rw-r--r--themes/nebirhos.zsh-theme2
-rw-r--r--themes/peepcode.zsh-theme4
-rw-r--r--themes/philips.zsh-theme2
-rw-r--r--themes/pmcgee.zsh-theme2
-rw-r--r--themes/pygmalion-virtualenv.zsh-theme49
-rw-r--r--themes/pygmalion.zsh-theme5
-rw-r--r--themes/random.zsh-theme38
-rw-r--r--themes/refined.zsh-theme (renamed from themes/pure.zsh-theme)3
-rw-r--r--themes/rkj-repos.zsh-theme13
-rw-r--r--themes/rkj.zsh-theme2
-rw-r--r--themes/robbyrussell.zsh-theme10
-rw-r--r--themes/simonoff.zsh-theme6
-rw-r--r--themes/simple.zsh-theme2
-rw-r--r--themes/sorin.zsh-theme8
-rw-r--r--themes/sporty_256.zsh-theme2
-rw-r--r--themes/steeef.zsh-theme29
-rw-r--r--themes/strug.zsh-theme25
-rw-r--r--themes/sunaku.zsh-theme1
-rw-r--r--themes/sunrise.zsh-theme9
-rw-r--r--themes/suvash.zsh-theme29
-rw-r--r--themes/tjkirch.zsh-theme2
-rw-r--r--themes/tjkirch_mod.zsh-theme2
-rw-r--r--themes/tonotdo.zsh-theme4
-rw-r--r--themes/trapd00r.zsh-theme111
-rw-r--r--themes/wedisagree.zsh-theme5
-rw-r--r--themes/xiong-chiamiov-plus.zsh-theme4
-rw-r--r--themes/xiong-chiamiov.zsh-theme4
-rw-r--r--themes/ys.zsh-theme54
83 files changed, 855 insertions, 543 deletions
diff --git a/themes/3den.zsh-theme b/themes/3den.zsh-theme
index 1d2c7db7f..ae3a88659 100644
--- a/themes/3den.zsh-theme
+++ b/themes/3den.zsh-theme
@@ -1,4 +1,4 @@
-PROMPT=$'%{$fg[white]%}$(~/.rvm/bin/rvm-prompt) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
+PROMPT=$'%{$fg[white]%}$(ruby_prompt_info) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
%{$fg_bold[green]%}%n$%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}("
diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
index 212b823a5..b9ac77d00 100644
--- a/themes/adben.zsh-theme
+++ b/themes/adben.zsh-theme
@@ -6,7 +6,7 @@
# # 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
-# # (http://www.commandlinefu.com) community: in order to make use of this functionality
+# # (https://www.commandlinefu.com) community: in order to make use of this functionality
# # 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
@@ -23,11 +23,11 @@
# # optionally:
# # -Oh-myzsh vcs plug-ins git and svn.
# # -Solarized theme (https://github.com/altercation/solarized/)
-# # -OS X: iTerm 2 (http://www.iterm2.com/)
+# # -OS X: iTerm 2 (https://iterm2.com/)
# # -font Source code pro (https://github.com/adobe/source-code-pro)
# #
# # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info:
-# # http://pthree.org/2008/11/23/727/
+# # https://pthree.org/2008/11/23/727/
# # enjoy!
########## COLOR ###########
for COLOR in CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY; do
@@ -42,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 ###########
diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
index 97d142a0f..148991fec 100644
--- a/themes/af-magic.zsh-theme
+++ b/themes/af-magic.zsh-theme
@@ -2,32 +2,41 @@
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
-if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
-local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-# primary prompt
-PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%}
-$FG[032]%~\
-$(git_prompt_info) \
-$FG[105]%(!.#.»)%{$reset_color%} '
-PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
-RPS1='${return_code}'
+# settings
+typeset +H return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
+typeset +H my_gray="$FG[237]"
+typeset +H my_orange="$FG[214]"
+# separator dashes size
+function afmagic_dashes {
+ [[ -n "${VIRTUAL_ENV-}" && -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" && "$PS1" = \(* ]] \
+ && echo $(( COLUMNS - ${#VIRTUAL_ENV} - 3 )) \
+ || echo $COLUMNS
+}
-# color vars
-eval my_gray='$FG[237]'
-eval my_orange='$FG[214]'
+# primary prompt
+PS1='$FG[237]${(l.$(afmagic_dashes)..-.)}%{$reset_color%}
+$FG[032]%~$(git_prompt_info)$(hg_prompt_info) $FG[105]%(!.#.»)%{$reset_color%} '
+PS2='%{$fg[red]%}\ %{$reset_color%}'
+RPS1='${return_code}'
# right prompt
-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
+(( $+functions[virtualenv_prompt_info] )) && RPS1+='$(virtualenv_prompt_info)'
+RPS1+=' $my_gray%n@%m%{$reset_color%}%'
# git settings
-ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
+ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075]($FG[078]"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
+
+# hg settings
+ZSH_THEME_HG_PROMPT_PREFIX="$FG[075]($FG[078]"
+ZSH_THEME_HG_PROMPT_CLEAN=""
+ZSH_THEME_HG_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
+ZSH_THEME_HG_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
+
+# virtualenv settings
+ZSH_THEME_VIRTUALENV_PREFIX=" $FG[075]["
+ZSH_THEME_VIRTUALENV_SUFFIX="]%{$reset_color%}"
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 8c7be6e01..8c700d06a 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -7,12 +7,19 @@
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
+# Make sure you have a recent version: the code points that Powerline
+# uses changed in 2012, and older versions will display incorrectly,
+# in confusing ways.
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
-# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
+# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app -
# it has significantly better color fidelity.
#
+# If using with "light" variant of the Solarized color schema, set
+# SOLARIZED_THEME variable to "light". If you don't specify, we'll assume
+# you're using the "dark" variant.
+#
# # Goals
#
# The aim of this theme is to only show you *relevant* information. Like most
@@ -26,7 +33,28 @@
# A few utility functions to make it easy and re-usable to draw segmented prompts
CURRENT_BG='NONE'
-SEGMENT_SEPARATOR=''
+
+case ${SOLARIZED_THEME:-dark} in
+ light) CURRENT_FG='white';;
+ *) CURRENT_FG='black';;
+esac
+
+# Special Powerline characters
+
+() {
+ local LC_ALL="" LC_CTYPE="en_US.UTF-8"
+ # NOTE: This segment separator character is correct. In 2012, Powerline changed
+ # the code points they use for their special characters. This is the new code point.
+ # If this is not working for you, you probably have an old version of the
+ # Powerline-patched fonts installed. Download and install the new version.
+ # Do not submit PRs to change this unless you have reviewed the Powerline code point
+ # history and have new information.
+ # This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of
+ # what font the user is viewing this source code in. Do not replace the
+ # escape sequence with a single literal character.
+ # Do not change this! Do not make it '\u2b80'; that is the old, wrong code point.
+ SEGMENT_SEPARATOR=$'\ue0b0'
+}
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@@ -61,22 +89,31 @@ prompt_end() {
# Context: user@hostname (who am I and where am I)
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
+ prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"
fi
}
# Git: branch/detached head, dirty status
prompt_git() {
+ (( $+commands[git] )) || return
+ if [[ "$(git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]]; then
+ return
+ fi
+ local PL_BRANCH_CHAR
+ () {
+ local LC_ALL="" LC_CTYPE="en_US.UTF-8"
+ PL_BRANCH_CHAR=$'\ue0a0' # 
+ }
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
+ repo_path=$(git rev-parse --git-dir 2>/dev/null)
dirty=$(parse_git_dirty)
- ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
@@ -94,16 +131,44 @@ prompt_git() {
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '✚'
- zstyle ':vcs_info:git:*' unstagedstr '●'
+ zstyle ':vcs_info:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
- echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}"
+ echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
+ fi
+}
+
+prompt_bzr() {
+ (( $+commands[bzr] )) || return
+
+ # Test if bzr repository in directory hierarchy
+ local dir="$PWD"
+ while [[ ! -d "$dir/.bzr" ]]; do
+ [[ "$dir" = "/" ]] && return
+ dir="${dir:h}"
+ done
+
+ local bzr_status status_mod status_all revision
+ if bzr_status=$(bzr status 2>&1); then
+ status_mod=$(echo -n "$bzr_status" | head -n1 | grep "modified" | wc -m)
+ status_all=$(echo -n "$bzr_status" | head -n1 | wc -m)
+ revision=$(bzr log -r-1 --log-format line | cut -d: -f1)
+ if [[ $status_mod -gt 0 ]] ; then
+ prompt_segment yellow black "bzr@$revision ✚"
+ else
+ if [[ $status_all -gt 0 ]] ; then
+ prompt_segment yellow black "bzr@$revision"
+ else
+ prompt_segment green black "bzr@$revision"
+ fi
+ fi
fi
}
prompt_hg() {
- local rev status
+ (( $+commands[hg] )) || return
+ local rev st branch
if $(hg id >/dev/null 2>&1); then
if $(hg prompt >/dev/null 2>&1); then
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
@@ -116,7 +181,7 @@ prompt_hg() {
st='±'
else
# if working copy is clean
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
echo -n $(hg prompt "☿ {rev}@{branch}") $st
else
@@ -126,11 +191,11 @@ prompt_hg() {
if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
- elif `hg st | grep -q "^(M|A)"`; then
+ elif `hg st | grep -q "^[MA]"`; then
prompt_segment yellow black
st='±'
else
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
echo -n "☿ $rev@$branch" $st
fi
@@ -139,7 +204,7 @@ prompt_hg() {
# Dir: current working directory
prompt_dir() {
- prompt_segment blue black '%~'
+ prompt_segment blue $CURRENT_FG '%~'
}
# Virtualenv: current working virtualenv
@@ -155,8 +220,8 @@ prompt_virtualenv() {
# - am I root
# - are there background jobs?
prompt_status() {
- local symbols
- symbols=()
+ local -a symbols
+
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
@@ -164,14 +229,29 @@ prompt_status() {
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
}
+#AWS Profile:
+# - display current AWS_PROFILE name
+# - displays yellow on red if profile name contains 'production' or
+# ends in '-prod'
+# - displays black on green otherwise
+prompt_aws() {
+ [[ -z "$AWS_PROFILE" ]] && return
+ case "$AWS_PROFILE" in
+ *-prod|*production*) prompt_segment red yellow "AWS: $AWS_PROFILE" ;;
+ *) prompt_segment green black "AWS: $AWS_PROFILE" ;;
+ esac
+}
+
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
+ prompt_aws
prompt_context
prompt_dir
prompt_git
+ prompt_bzr
prompt_hg
prompt_end
}
diff --git a/themes/alanpeabody.zsh-theme b/themes/alanpeabody.zsh-theme
index 4a1b1b386..1de90e57b 100644
--- a/themes/alanpeabody.zsh-theme
+++ b/themes/alanpeabody.zsh-theme
@@ -1,17 +1,10 @@
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
-local rvm=''
-if which rvm-prompt &> /dev/null; then
- rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
-else
- if which rbenv &> /dev/null; then
- rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
- fi
-fi
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
+ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
@@ -24,5 +17,8 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
+
PROMPT="${user} ${pwd}$ "
-RPROMPT="${return_code} ${git_branch} ${rvm}"
+RPROMPT="${return_code} ${git_branch} \$(ruby_prompt_info)"
diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme
index 548f6d39d..3f7ec0bc5 100644
--- a/themes/amuse.zsh-theme
+++ b/themes/amuse.zsh-theme
@@ -1,21 +1,18 @@
# vim:ft=zsh ts=2 sw=2 sts=2
-rvm_current() {
- rvm current 2>/dev/null
-}
+# Must use Powerline font, for \uE0A0 to render.
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 "
+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=""
-rbenv_version() {
- rbenv version 2>/dev/null | awk '{print $1}'
-}
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg_bold[red]%}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
PROMPT='
-%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
+%{$fg_bold[green]%}%~%{$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='$(ruby_prompt_info)'
-RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme
index d62dcdcb9..a3e77d65d 100644
--- a/themes/arrow.zsh-theme
+++ b/themes/arrow.zsh-theme
@@ -8,7 +8,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="*"
ZSH_THEME_GIT_PROMPT_CLEAN=""
-# See http://geoff.greer.fm/lscolors/
+# See https://geoff.greer.fm/lscolors/
export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"
export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:"
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
index a21a9c8c4..0261f0ff3 100644
--- a/themes/avit.zsh-theme
+++ b/themes/avit.zsh-theme
@@ -1,18 +1,20 @@
# AVIT ZSH Theme
-PROMPT='
-$(_user_host)${_current_dir} $(git_prompt_info) $(_ruby_version)
-▶ '
+# settings
+typeset +H _current_dir="%{$fg_bold[blue]%}%3~%{$reset_color%} "
+typeset +H _return_status="%{$fg_bold[red]%}%(?..⍉)%{$reset_color%}"
+typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}"
-PROMPT2='%{$fg[grey]%}◀%{$reset_color%} '
+PROMPT='
+$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info)
+%{%(!.%F{red}.%F{white})%}▶%{$resetcolor%} '
-RPROMPT='$(_vi_status)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
+PROMPT2='%{%(!.%F{red}.%F{white})%}◀%{$reset_color%} '
-local _current_dir="%{$fg[blue]%}%3~%{$reset_color%} "
-local _return_status="%{$fg[red]%}%(?..⍉)%{$reset_color%}"
-local _hist_no="%{$fg[grey]%}%h%{$reset_color%}"
+RPROMPT='$(vi_mode_prompt_info)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}'
function _user_host() {
+ local me
if [[ -n $SSH_CONNECTION ]]; then
me="%n@%m"
elif [[ $LOGNAME != $USER ]]; then
@@ -23,63 +25,41 @@ function _user_host() {
fi
}
-function _vi_status() {
- if {echo $fpath | grep -q "plugins/vi-mode"}; then
- echo "$(vi_mode_prompt_info)"
- fi
-}
-
-function _ruby_version() {
- if {echo $fpath | grep -q "plugins/rvm"}; then
- echo "%{$fg[grey]%}$(rvm_prompt_info)%{$reset_color%}"
- fi
-}
-
# 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%}"
+ local last_commit now seconds_since_last_commit
+ local minutes hours days years commit_age
+ # Only proceed if there is actually a commit.
+ if last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null); then
+ now=$(date +%s)
+ seconds_since_last_commit=$((now-last_commit))
+
+ # Totals
+ minutes=$((seconds_since_last_commit / 60))
+ hours=$((minutes / 60))
+ days=$((hours / 24))
+ years=$((days / 365))
+
+ if [[ $years -gt 0 ]]; then
+ commit_age="${years}y$((days % 365 ))d"
+ elif [[ $days -gt 0 ]]; then
+ commit_age="${days}d$((hours % 24))h"
+ elif [[ $hours -gt 0 ]]; then
+ commit_age+="${hours}h$(( minutes % 60 ))m"
+ else
+ commit_age="${minutes}m"
fi
+
+ echo "${ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL}${commit_age}%{$reset_color%}"
fi
}
-if [[ $USER == "root" ]]; then
- CARETCOLOR="red"
-else
- CARETCOLOR="white"
-fi
-
MODE_INDICATOR="%{$fg_bold[yellow]%}❮%{$reset_color%}%{$fg[yellow]%}❮❮%{$reset_color%}"
+# Git prompt settings
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}✚ "
@@ -87,16 +67,19 @@ 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[cyan]%}§ "
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}◒ "
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%}◒ "
+
+# Ruby prompt settings
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[grey]%}"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
# Colors vary depending on time lapsed.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
-ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}"
+ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[white]%}"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
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/bira.zsh-theme b/themes/bira.zsh-theme
index 215720477..cdae68d6c 100644
--- a/themes/bira.zsh-theme
+++ b/themes/bira.zsh-theme
@@ -1,21 +1,32 @@
-# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
+# ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
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%}'
+if [[ $UID -eq 0 ]]; then
+ local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
+ local user_symbol='#'
else
- if which rbenv &> /dev/null; then
- rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
- fi
+ local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
+ local user_symbol='$'
fi
-local git_branch='$(git_prompt_info)%{$reset_color%}'
-PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
-╰─%B$%b "
-RPS1="${return_code}"
+local current_dir='%{$terminfo[bold]$fg[blue]%}%~ %{$reset_color%}'
+local git_branch='$(git_prompt_info)'
+local rvm_ruby='$(ruby_prompt_info)'
+local venv_prompt='$(virtualenv_prompt_info)'
+
+ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
+
+PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${git_branch}${venv_prompt}
+╰─%B${user_symbol}%b "
+RPROMPT="%B${return_code}%b"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
+
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
+
+ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$fg[green]%}‹"
+ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="› %{$reset_color%}"
+ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
+ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
index 148abec10..3b3bdc80f 100644
--- a/themes/bureau.zsh-theme
+++ b/themes/bureau.zsh-theme
@@ -22,34 +22,44 @@ bureau_git_branch () {
echo "${ref#refs/heads/}"
}
-bureau_git_status () {
- _INDEX=$(command git status --porcelain -b 2> /dev/null)
+bureau_git_status() {
_STATUS=""
- if $(echo "$_INDEX" | grep '^[AMRD]. ' &> /dev/null); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
- fi
- if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
- fi
- 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
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
- fi
- if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
+
+ # check status of files
+ _INDEX=$(command git status --porcelain 2> /dev/null)
+ if [[ -n "$_INDEX" ]]; then
+ if $(echo "$_INDEX" | command grep -q '^[AMRD]. '); then
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
+ fi
+ if $(echo "$_INDEX" | command grep -q '^.[MTD] '); then
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
+ fi
+ if $(echo "$_INDEX" | command grep -q -E '^\?\? '); then
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
+ fi
+ if $(echo "$_INDEX" | command grep -q '^UU '); then
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
+ fi
+ else
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
- if $(echo "$_INDEX" | grep '^## .*ahead' &> /dev/null); then
+
+ # check status of local repository
+ _INDEX=$(command git status --porcelain -b 2> /dev/null)
+ if $(echo "$_INDEX" | command grep -q '^## .*ahead'); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
- if $(echo "$_INDEX" | grep '^## .*behind' &> /dev/null); then
+ if $(echo "$_INDEX" | command grep -q '^## .*behind'); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
- if $(echo "$_INDEX" | grep '^## .*diverged' &> /dev/null); then
+ if $(echo "$_INDEX" | command grep -q '^## .*diverged'); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
fi
+ if $(command git rev-parse --verify refs/stash &> /dev/null); then
+ _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
+ fi
+
echo $_STATUS
}
@@ -84,10 +94,10 @@ _LIBERTY="$_LIBERTY%{$reset_color%}"
get_space () {
local STR=$1$2
local zero='%([BSUbfksu]|([FB]|){*})'
- local LENGTH=${#${(S%%)STR//$~zero/}}
+ local LENGTH=${#${(S%%)STR//$~zero/}}
local SPACES=""
(( LENGTH = ${COLUMNS} - $LENGTH - 1))
-
+
for i in {0..$LENGTH}
do
SPACES="$SPACES "
@@ -101,7 +111,7 @@ _1RIGHT="[%*] "
bureau_precmd () {
_1SPACES=`get_space $_1LEFT $_1RIGHT`
- print
+ print
print -rP "$_1LEFT$_1SPACES$_1RIGHT"
}
diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme
index 889128758..ad03cc320 100644
--- a/themes/candy-kingdom.zsh-theme
+++ b/themes/candy-kingdom.zsh-theme
@@ -1,23 +1,21 @@
-# neuralsanwich.zsh-theme
-
-if [ "x$OH_MY_ZSH_HG" = "x" ]; then
- OH_MY_ZSH_HG="hg"
-fi
-
-function hg_prompt_info {
- $OH_MY_ZSH_HG prompt --angle-brackets "\
+if ! hg prompt 2>/dev/null; then
+ function hg_prompt_info { }
+else
+ function hg_prompt_info {
+ hg prompt --angle-brackets "\
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[green]%}<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
-}
+ }
+fi
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
PROMPT='
-%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
+%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: "
@@ -26,5 +24,9 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}?"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[orange]%}!"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
-local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}"
-RPROMPT='${return_status}$(battery_time_remaining) $(battery_pct_prompt)%{$reset_color%}'
+RPROMPT='%{$fg[red]%}%(?..✘)%{$reset_color%}'
+
+# Add battery status if the battery plugin is enabled
+if (( $+functions[battery_pct_prompt] )); then
+ RPROMPT+='$(battery_time_remaining) $(battery_pct_prompt)%{$reset_color%}'
+fi
diff --git a/themes/candy.zsh-theme b/themes/candy.zsh-theme
index bc125c5ce..40e6d411e 100644
--- a/themes/candy.zsh-theme
+++ b/themes/candy.zsh-theme
@@ -1,4 +1,4 @@
-PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
+PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme
index 7ee29cb8c..5c96e4726 100644
--- a/themes/clean.zsh-theme
+++ b/themes/clean.zsh-theme
@@ -9,6 +9,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme
index 4efbf9776..59a3472b6 100644
--- a/themes/cloud.zsh-theme
+++ b/themes/cloud.zsh-theme
@@ -6,5 +6,5 @@ PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[gr
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" \ No newline at end of file
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡ %{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
diff --git a/themes/crcandy.zsh-theme b/themes/crcandy.zsh-theme
index 0a63c1245..5b9cd42f8 100644
--- a/themes/crcandy.zsh-theme
+++ b/themes/crcandy.zsh-theme
@@ -1,5 +1,5 @@
PROMPT=$'
-%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
+%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%H:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
index 2fc066381..8278661ab 100644
--- a/themes/crunch.zsh-theme
+++ b/themes/crunch.zsh-theme
@@ -29,13 +29,9 @@ ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
# Our elements:
CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
-if [ -e ~/.rvm/bin/rvm-prompt ]; then
- CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
-else
- if which rbenv &> /dev/null; then
- CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(rbenv version | sed -e 's/ (set.*$//' -e 's/^ruby-//')}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
- fi
-fi
+ZSH_THEME_RUBY_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
+CRUNCH_RVM_='$(ruby_prompt_info)'
CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
diff --git a/themes/cypher.zsh-theme b/themes/cypher.zsh-theme
index 45df53d22..6e6b78ee6 100644
--- a/themes/cypher.zsh-theme
+++ b/themes/cypher.zsh-theme
@@ -1,4 +1,4 @@
# Based on evan's prompt
# Shows the exit status of the last command if non-zero
# Uses "#" instead of "»" when running with elevated privileges
-PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} "
+PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . %{${fg[red]}%}%? )%{${fg[blue]}%}»%{${reset_color}%} "
diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme
index e9e86177b..d6c417fc3 100644
--- a/themes/dallas.zsh-theme
+++ b/themes/dallas.zsh-theme
@@ -2,14 +2,6 @@
# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
-# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
-if [ -e ~/.rvm/bin/rvm-prompt ]; then
- DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
-else
- if which rbenv &> /dev/null; then
- DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}"
- fi
-fi
# Grab the current machine name: muscato
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
# Grab the current filepath, use shortcuts: ~/Desktop
@@ -28,5 +20,8 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[white]%}[%{$fg[magenta]%}"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$fg[white]%}]%{$reset_color%}"
+
# Put it all together!
-PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
+PROMPT="$DALLAS_CURRENT_TIME_\$(ruby_prompt_info)$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme
index 0bd38acc2..6a9921288 100644
--- a/themes/dogenpunk.zsh-theme
+++ b/themes/dogenpunk.zsh-theme
@@ -3,7 +3,7 @@
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
-PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम् %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
+PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ॐ %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
@@ -37,7 +37,7 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
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
+ if git log -n 1 > /dev/null 2>&1; then
# Get the last commit.
last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
now=`date +%s`
diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme
index 3e2539d57..6b2f8767d 100644
--- a/themes/dst.zsh-theme
+++ b/themes/dst.zsh-theme
@@ -11,6 +11,6 @@ function prompt_char {
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
)
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
-%_ $(prompt_char) '
+$(prompt_char) '
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme
index 5a23fcea5..39ce69819 100644
--- a/themes/dstufft.zsh-theme
+++ b/themes/dstufft.zsh-theme
@@ -9,7 +9,7 @@ function virtualenv_info {
}
PROMPT='
-%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
+%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)
$(virtualenv_info)$(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
diff --git a/themes/duellj.zsh-theme b/themes/duellj.zsh-theme
index 3849c35be..f70b39bc3 100644
--- a/themes/duellj.zsh-theme
+++ b/themes/duellj.zsh-theme
@@ -1,6 +1,6 @@
# 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
+# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b '
RPROMPT='[%*]'
diff --git a/themes/eastwood.zsh-theme b/themes/eastwood.zsh-theme
index 1b284cdc2..88134f8e6 100644
--- a/themes/eastwood.zsh-theme
+++ b/themes/eastwood.zsh-theme
@@ -14,9 +14,9 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
- local cb=$(current_branch)
+ local cb=$(git_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)$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme
new file mode 100644
index 000000000..13adad78d
--- /dev/null
+++ b/themes/emotty.zsh-theme
@@ -0,0 +1,103 @@
+#!/usr/bin/env zsh
+# ------------------------------------------------------------------------------
+# FILE: emotty.zsh-theme
+# DESCRIPTION: A varying emoji based theme
+# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
+# VERSION: 1.0.0
+# DEPENDS: emotty plugin
+# RECOMMENDS: Hasklig font
+#
+# This theme shows a different emoji for each tty at the main prompt.
+#
+# There are pre-defined different emoji sets to choose from, e.g.:
+# emoji, stellar, floral, zodiac, love (see emotty plugin).
+#
+# To choose a different emotty set than the default (emoji)
+# % export emotty_set=nature
+#
+# For the superuser (root) this theme shows a designated indicator
+# and switches the foreground color to red
+# (see root_prompt variable, default: skull).
+# But you are using sudo (8) instead of designated a root shell, right‽
+#
+# When logged in via SSH the main prompt also shows the user- and hostname.
+#
+# The exit status of the last failed command is displayed in the window title
+# along with an indicator (see warn_glyph variable, default: collision symbol).
+# To clear it just run: $NULL, true or :
+#
+# The right prompt shows the current working directory (3 levels up) in cyan.
+#
+# When in a git repository the main prompt shows the current branch name
+# with a branch indicator in yellow
+# (see vcs_branch_glyph variable, default: Hasklig branch glyph).
+#
+# If there are modified files the prompt switches to red and shows an unstaged
+# indicator (see vcs_unstaged_glyph variable, default: circled letter M).
+#
+# If there are staged files the prompt switches to green and shows an staged
+# indicator (see vcs_staged_glyph variable, default: high voltage sign).
+#
+# In a git repository the right prompt shows the repository name in bold and
+# prepends the current working directory subpath within the repository.
+#
+# When git currently performs an action such as merge or rebase, the action is
+# displayed in red instead of the branch name and a special action indicator
+# is shown (see vcs_action_glyph variable, default: chevron).
+# ------------------------------------------------------------------------------
+
+user_prompt="$(emotty)"
+root_prompt="$emoji[skull]"
+warn_prompt="$emoji[collision_symbol]"
+
+vcs_unstaged_glyph="%{$emoji[circled_latin_capital_letter_m]$emoji2[emoji_style] %2G%}"
+vcs_staged_glyph="%{$emoji[high_voltage_sign] %2G%}"
+vcs_branch_glyph=$(print -P $'\Ue0a0') # 
+vcs_action_glyph=$(print -P $'\U276f') # ❯
+
+red="$FG[001]"
+yellow="$FG[003]"
+green="$FG[002]"
+cyan="$FG[014]"
+
+prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}"
+
+# Uncomment the next line if you also like to see the warn_prompt in the prompt on the right.
+#last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)"
+
+
+setopt promptsubst
+
+# Workaround for zsh 5.2 release (kudos to @timothybasanov)
+autoload +X VCS_INFO_nvcsformats
+functions[VCS_INFO_nvcsformats]=${functions[VCS_INFO_nvcsformats]/local -a msgs/}
+
+autoload -U add-zsh-hook
+autoload -Uz vcs_info
+
+zstyle ':vcs_info:*' enable git #hg svn cvs
+zstyle ':vcs_info:*' get-revision false
+zstyle ':vcs_info:*' check-for-changes true
+zstyle ':vcs_info:git:*' unstagedstr "${red}${vcs_unstaged_glyph}"
+zstyle ':vcs_info:*' stagedstr "${green}${vcs_staged_glyph}"
+
+# %(K|F){color} set (back|fore)ground color
+# %(k|f) reset (back|fore)ground color
+zstyle ':vcs_info:*' max-exports 3
+zstyle ':vcs_info:*' nvcsformats "${prompt_glyph}" '%3~' ''
+zstyle ':vcs_info:*' formats "${yellow}%u%c%b${vcs_branch_glyph}%f" '%S|' "$FX[bold]%r$FX[no-bold]"
+zstyle ':vcs_info:*' actionformats "${red}%K{white}%a${vcs_action_glyph}%k%f" '%S|' "$FX[bold]%r$FX[no-bold]"
+
+red_if_root="%(!.%F{red}.)"
+sshuser_on_host="${SSH_TTY:+%(!.$red.$yellow)%n@%m$reset_color}"
+
+PROMPT='${sshuser_on_host}${vcs_info_msg_0_}${red_if_root} '
+RPROMPT='${cyan}${vcs_info_msg_1_##.|}${vcs_info_msg_2_}%f${last_command_failed}'
+
+emotty_title() {
+ title "${${?/[^0]*/$warn_prompt $?}/0/${prompt_glyph}}"
+}
+add-zsh-hook precmd emotty_title
+add-zsh-hook precmd vcs_info
+
+# vim:ft=zsh ts=2 sw=2 sts=2
diff --git a/themes/evan.zsh-theme b/themes/evan.zsh-theme
index 5ef1f40dd..02ca22d4c 100644
--- a/themes/evan.zsh-theme
+++ b/themes/evan.zsh-theme
@@ -1,2 +1,2 @@
-# Evan describes this sexy prompt as: "a skinny, topless prompt"
-PROMPT='%m :: %2~ %B»%b ' \ No newline at end of file
+# Evan's minimal prompt
+PROMPT='%m :: %2~ %B»%b '
diff --git a/themes/example.zsh-theme b/themes/example.zsh-theme
deleted file mode 100644
index dbd9dc9c9..000000000
--- a/themes/example.zsh-theme
+++ /dev/null
@@ -1,5 +0,0 @@
-# Found on the ZshWiki
-# http://zshwiki.org/home/config/prompt
-#
-
-PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " \ No newline at end of file
diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
index 67b6b6e08..5679e9f37 100644
--- a/themes/fino-time.zsh-theme
+++ b/themes/fino-time.zsh-theme
@@ -21,19 +21,20 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
-local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}'
-local current_dir='${PWD/#$HOME/~}'
+local rvm_ruby='using%{$FG[243]%}$(ruby_prompt_info)'
local git_info='$(git_prompt_info)'
-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]%} ${rvm_ruby} %D - %*
+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]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %*
╰─$(virtualenv_info)$(prompt_char) "
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]%}✔"
+ZSH_THEME_RUBY_PROMPT_PREFIX="‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
index 50d41e899..1d8bb30e1 100644
--- a/themes/fino.zsh-theme
+++ b/themes/fino.zsh-theme
@@ -17,27 +17,20 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
-local ruby_env=''
-if which rvm-prompt &> /dev/null; then
- ruby_env=' ‹$(rvm-prompt i v g)›%{$reset_color%}'
-else
- if which rbenv &> /dev/null; then
- ruby_env=' ‹$(rbenv version-name)›%{$reset_color%}'
- fi
-fi
-
-local current_dir='${PWD/#$HOME/~}'
+local ruby_env='using%{$FG[243]%} $(ruby_prompt_info)'
local git_info='$(git_prompt_info)'
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="╭─%{$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]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${ruby_env}
╰─${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]%}✔"
+ZSH_THEME_RUBY_PROMPT_PREFIX="‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme
index 8b24172a2..00a60f45b 100644
--- a/themes/fishy.zsh-theme
+++ b/themes/fishy.zsh-theme
@@ -1,20 +1,20 @@
# ZSH Theme emulating the Fish shell's default prompt.
_fishy_collapsed_wd() {
- echo $(pwd | perl -pe "
+ echo $(pwd | perl -pe '
BEGIN {
- binmode STDIN, ':encoding(UTF-8)';
- binmode STDOUT, ':encoding(UTF-8)';
- }; s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g
-")
-}
+ binmode STDIN, ":encoding(UTF-8)";
+ binmode STDOUT, ":encoding(UTF-8)";
+ }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g
+')
+}
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
-RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
+RPROMPT="${RPROMPT}"'${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" "
ZSH_THEME_GIT_PROMPT_SUFFIX=""
diff --git a/themes/frontcube.zsh-theme b/themes/frontcube.zsh-theme
index d9f5b6d9c..f9488d0ac 100644
--- a/themes/frontcube.zsh-theme
+++ b/themes/frontcube.zsh-theme
@@ -1,12 +1,13 @@
-local rvm="%{$fg[green]%}[$(rvm-prompt i v g)]%{$reset_color%}"
PROMPT='
%{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%}
%{$fg[green]%}➞ %{$reset_color%'
-RPROMPT='$(git_prompt_info) $(rvm)'
+RPROMPT='$(git_prompt_info) $(ruby_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✖ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] %{$fg[green]%}✔%{$reset_color%}"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[green]%}["
+ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
diff --git a/themes/funky.zsh-theme b/themes/funky.zsh-theme
index 2451296d9..574538f88 100644
--- a/themes/funky.zsh-theme
+++ b/themes/funky.zsh-theme
@@ -1,5 +1,5 @@
# Taken from Tassilo's Blog
-# http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/
+# https://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/
local blue_op="%{$fg[blue]%}[%{$reset_color%}"
local blue_cp="%{$fg[blue]%}]%{$reset_color%}"
@@ -11,4 +11,4 @@ local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color
PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no}
╰─${blue_op}${smiley}${blue_cp} %# "
local cur_cmd="${blue_op}%_${blue_cp}"
-PROMPT2="${cur_cmd}> " \ No newline at end of file
+PROMPT2="${cur_cmd}> "
diff --git a/themes/gallifrey.zsh-theme b/themes/gallifrey.zsh-theme
index fce7cb923..47b057fa3 100644
--- a/themes/gallifrey.zsh-theme
+++ b/themes/gallifrey.zsh-theme
@@ -1,8 +1,11 @@
-# ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg
-local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
+# ZSH Theme - Preview: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#gallifrey
+return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
+host_color="%(!.%{$fg[red]%}.%{$fg[green]%})"
-PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(git_prompt_info)%{$reset_color%}%B»%b '
+PROMPT="${host_color}%m%{$reset_color%} %2~ \$(git_prompt_info)%{$reset_color%}%B»%b "
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
+
+unset return_code host_color
diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
index d383ed583..e6c2d8142 100644
--- a/themes/gallois.zsh-theme
+++ b/themes/gallois.zsh-theme
@@ -1,3 +1,5 @@
+# Depends on the git plugin for work_in_progress()
+
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
@@ -5,15 +7,15 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
- local cb=$(current_branch)
+ local cb=$(git_current_branch)
if [ -n "$cb" ]; then
- echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$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$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
# RVM component of prompt
-ZSH_THEME_RVM_PROMPT_PREFIX="%{$fg[red]%}["
-ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}["
+ZSH_THEME_RUBY_PROMPT_SUFFIX="]%{$reset_color%}"
# Combine it all into a final right-side prompt
RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1'
diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme
index ee205d248..5f2427c7a 100644
--- a/themes/gentoo.zsh-theme
+++ b/themes/gentoo.zsh-theme
@@ -2,7 +2,7 @@ function prompt_char {
if [ $UID -eq 0 ]; then echo "#"; else echo $; fi
}
-PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '
+PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)$(prompt_char)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=") "
diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index ab154c1e5..1e6c4e93b 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -1,53 +1,43 @@
-# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png
# Based on bira theme
-# load some modules
-autoload -U zsh/terminfo # Used in the colour alias below
setopt prompt_subst
-# 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
-eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
-eval PR_BOLD="%{$terminfo[bold]%}"
+() {
+
+local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
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'
+ PR_USER='%F{green}%n%f'
+ PR_USER_OP='%F{green}%#%f'
+ PR_PROMPT='%f➤ %f'
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'
+ PR_USER='%F{red}%n%f'
+ PR_USER_OP='%F{red}%#%f'
+ PR_PROMPT='%F{red}➤ %f'
fi
# Check if we are on SSH or not
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
- eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH
+ PR_HOST='%F{red}%M%f' # SSH
else
- eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH
+ PR_HOST='%F{green}%M%f' # no SSH
fi
-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 ${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%}'
-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%}'
-#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
-PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
+local return_code="%(?..%F{red}%? ↵%f)"
+
+local user_host="${PR_USER}%F{cyan}@${PR_HOST}"
+local current_dir="%B%F{blue}%~%f%b"
+local git_branch='$(git_prompt_info)'
+
+PROMPT="╭─${user_host} ${current_dir} \$(ruby_prompt_info) ${git_branch}
╰─$PR_PROMPT "
-RPS1="${return_code}"
+RPROMPT="${return_code}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹"
+ZSH_THEME_GIT_PROMPT_SUFFIX="› %f"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%F{red}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%f"
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
-ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}"
+}
diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
index a3c505706..c79027ed6 100644
--- a/themes/half-life.zsh-theme
+++ b/themes/half-life.zsh-theme
@@ -1,11 +1,11 @@
# prompt style and colors based on Steve Losh's Prose theme:
-# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
+# https://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
#
# vcs_info modifications from Bart Trojanowski's zsh prompt:
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
#
# git untracked files modification from Brian Carper:
-# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
+# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
@@ -17,7 +17,7 @@ setopt prompt_subst
autoload -U add-zsh-hook
autoload -Uz vcs_info
-#use extended color pallete if available
+#use extended color palette if available
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
turquoise="%F{81}"
orange="%F{166}"
@@ -60,7 +60,7 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats ""
function steeef_preexec {
- case "$(history $HISTCMD)" in
+ case "$2" in
*git*)
PR_GIT_UPDATE=1
;;
diff --git a/themes/itchy.zsh-theme b/themes/itchy.zsh-theme
index c23889edf..41a42e88c 100644
--- a/themes/itchy.zsh-theme
+++ b/themes/itchy.zsh-theme
@@ -1,5 +1,3 @@
-# Inspired by http://peepcode.com/blog/2012/my-command-line-prompt
-
local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
local user="%{$fg[cyan]%}%n%{$reset_color%}"
@@ -9,10 +7,12 @@ local pwd="%{$fg[yellow]%}%~%{$reset_color%}"
PROMPT='${user}${host} ${pwd}
${smiley} '
-RPROMPT='$(rvm-prompt || rbenv version) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}'
+RPROMPT='$(ruby_prompt_info) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔%{$reset_color%}"
+ZSH_THEME_RUBY_PROMPT_PREFIX=""
+ZSH_THEME_RUBY_PROMPT_SUFFIX=""
diff --git a/themes/jaischeema.zsh-theme b/themes/jaischeema.zsh-theme
index da1dd1e5d..50d2bc4a5 100644
--- a/themes/jaischeema.zsh-theme
+++ b/themes/jaischeema.zsh-theme
@@ -1,16 +1,12 @@
# 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%} '
+RPROMPT='$(ruby_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="±(%{$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]%}) "
-if which rbenv &> /dev/null; then
- RPROMPT='%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%}'
-else
- if which rvm-prompt &> /dev/null; then
- RPROMPT='%{$fg[red]%}$(rvm-prompt)%{$reset_color%}'
- fi
-fi
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
diff --git a/themes/josh.zsh-theme b/themes/josh.zsh-theme
index 12dfe4069..c8f0f4dd7 100644
--- a/themes/josh.zsh-theme
+++ b/themes/josh.zsh-theme
@@ -9,7 +9,7 @@ function josh_prompt {
(( spare_width = ${COLUMNS} ))
prompt=" "
- branch=$(current_branch)
+ branch=$(git_current_branch)
ruby_version=$(rvm_prompt_info || rbenv_prompt_info)
path_size=${#PWD}
branch_size=${#branch}
@@ -31,7 +31,7 @@ function josh_prompt {
prompt=" $prompt"
done
- prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(current_branch)"
+ prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(git_current_branch)"
echo $prompt
}
diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme
index 0fa6b4ecd..de42a1010 100644
--- a/themes/jreese.zsh-theme
+++ b/themes/jreese.zsh-theme
@@ -1,5 +1,3 @@
-# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png
-
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
diff --git a/themes/juanghurtado.zsh-theme b/themes/juanghurtado.zsh-theme
index bc470e838..dbdfde7b8 100644
--- a/themes/juanghurtado.zsh-theme
+++ b/themes/juanghurtado.zsh-theme
@@ -1,5 +1,3 @@
-# Needs Git plugin for current_branch method
-
# Color shortcuts
RED=$fg[red]
YELLOW=$fg[yellow]
@@ -40,4 +38,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%}'
+RPROMPT='%{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
diff --git a/themes/kennethreitz.zsh-theme b/themes/kennethreitz.zsh-theme
index 109be0c22..b255a8d66 100644
--- a/themes/kennethreitz.zsh-theme
+++ b/themes/kennethreitz.zsh-theme
@@ -1,13 +1,15 @@
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-PROMPT='%{$fg[green]%}%c \
+PROMPT='$(virtualenv_prompt_info)%{%}%{$fg[green]%}%c \
$(git_prompt_info)\
+\
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}("
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}"
-
+ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%{$reset_color%}%{%}%{$fg[blue]%}"
+ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="!%{$reset_color%} " \ No newline at end of file
diff --git a/themes/kiwi.zsh-theme b/themes/kiwi.zsh-theme
index f93de2b75..94f0ffcbf 100644
--- a/themes/kiwi.zsh-theme
+++ b/themes/kiwi.zsh-theme
@@ -1,6 +1,4 @@
-#
-# Kiwi ZSH Theme
-#
+(( $+functions[battery_pct_prompt] )) || function battery_pct_prompt { }
PROMPT='%{$fg_bold[green]%}┌[%{$fg_bold[cyan]%}kiwish-4.2%{$fg_bold[green]%}]-(%{$fg_bold[white]%}%2~%{$fg_bold[green]%})-$(git_prompt_info)$(svn_prompt_info)$(battery_pct_prompt)
└> % %{$reset_color%}'
diff --git a/themes/lambda.zsh-theme b/themes/lambda.zsh-theme
index 63292d331..6e67773ea 100644
--- a/themes/lambda.zsh-theme
+++ b/themes/lambda.zsh-theme
@@ -1,5 +1,3 @@
-# ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S
-
PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme
index f4045bd8e..cdecd284f 100644
--- a/themes/lukerandall.zsh-theme
+++ b/themes/lukerandall.zsh-theme
@@ -1,4 +1,4 @@
-# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc
+# ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc
# Thanks to gallifrey, upon whose theme this is based
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme
index 69d80d588..d3ee200a9 100644..120000
--- a/themes/macovsky-ruby.zsh-theme
+++ b/themes/macovsky-ruby.zsh-theme
@@ -1,15 +1 @@
-# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
-local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-
-if [ -e ~/.rvm/bin/rvm-prompt ]; then
- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
-else
- if which rbenv &> /dev/null; then
- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
- fi
-fi
-
-RPS1="${return_code}"
-
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
-ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
+macovsky.zsh-theme \ No newline at end of file
diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme
index 2e6dce42d..f527e5861 100644
--- a/themes/macovsky.zsh-theme
+++ b/themes/macovsky.zsh-theme
@@ -1,14 +1,12 @@
-# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
+# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-if [ -e ~/.rvm/bin/rvm-prompt ]; then
- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
-else
- if which rbenv &> /dev/null; then
- PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
- fi
-fi
-RPS1="${return_code}"
+PROMPT='%{$fg[green]%}%~%{$reset_color%} $(ruby_prompt_info) $(git_prompt_info)%{$reset_color%}%B$%b '
+RPROMPT="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
+
+
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="› %{$reset_color%}"
diff --git a/themes/maran.zsh-theme b/themes/maran.zsh-theme
index 6fba04688..fddb7bc30 100644
--- a/themes/maran.zsh-theme
+++ b/themes/maran.zsh-theme
@@ -1,6 +1,6 @@
# Theme with full path names and hostname
# Handy if you work on different servers all the time;
-PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) '
+PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%}$(git_prompt_info) %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
diff --git a/themes/mh.zsh-theme b/themes/mh.zsh-theme
index 34a3765b1..2b2cc9b68 100644
--- a/themes/mh.zsh-theme
+++ b/themes/mh.zsh-theme
@@ -1,5 +1,5 @@
# mh theme
-# preview: http://cl.ly/1y2x0W0E3t2C0F29043z
+# preview: https://cl.ly/1y2x0W0E3t2C0F29043z
# features:
# path is autoshortened to ~30 characters
@@ -19,6 +19,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
index a7599c8f5..7ff6a7ffe 100644
--- a/themes/michelebologna.zsh-theme
+++ b/themes/michelebologna.zsh-theme
@@ -1,44 +1,75 @@
-# 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 $HOST; 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
+# https://www.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="$blue%%"
+ZSH_THEME_GIT_PROMPT_MODIFIED="$red*"
+ZSH_THEME_GIT_PROMPT_ADDED="$green+"
+ZSH_THEME_GIT_PROMPT_STASHED="$blue$"
+ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="$green="
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>"
-# 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].)'
+GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)'
+PROMPT+="$GIT_PROMPT"
+PROMPT+=" $last_command_output%#$reset "
+RPROMPT=''
diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme
index a95383ba5..f231b91bb 100644
--- a/themes/mikeh.zsh-theme
+++ b/themes/mikeh.zsh-theme
@@ -15,7 +15,7 @@ mikeh_precmd() {
# 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
+# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b '
-PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' \ No newline at end of file
+PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
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
index e6c952998..a7c60359c 100644
--- a/themes/mira.zsh-theme
+++ b/themes/mira.zsh-theme
@@ -4,22 +4,13 @@ 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='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
-local nvm_node=''
-nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
+local jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
-local jenv_java=''
-jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
+local git_branch='$(git_prompt_info)'
-local git_branch='$(git_prompt_info)%{$reset_color%}'
+local rvm_ruby='$(ruby_prompt_info)'
PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
╰─%B$%b "
@@ -27,3 +18,6 @@ RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
+
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[red]%}‹"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme
index ccce4197a..d81a7ca06 100644
--- a/themes/mortalscumbag.zsh-theme
+++ b/themes/mortalscumbag.zsh-theme
@@ -5,10 +5,15 @@ function my_git_prompt() {
STATUS=""
# is branch ahead?
- if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
+ # is branch behind?
+ if $(echo "$(git log HEAD..origin/$(git_current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
+ fi
+
# is anything staged?
if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
@@ -37,7 +42,7 @@ function my_git_prompt() {
}
function my_current_branch() {
- echo $(current_branch || echo "(no branch)")
+ echo $(git_current_branch || echo "(no branch)")
}
function ssh_connection() {
@@ -52,6 +57,7 @@ PROMPT=$'\n$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_pro
ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}"
ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white]‹ %{$fg_bold[yellow]%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[magenta]%}↑"
+ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[green]%}↓"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[red]%}●"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[white]%}●"
diff --git a/themes/muse.zsh-theme b/themes/muse.zsh-theme
index 4bd8fb825..c7cd9ee30 100644
--- a/themes/muse.zsh-theme
+++ b/themes/muse.zsh-theme
@@ -13,11 +13,11 @@ GIT_DIRTY_COLOR=$FG[133]
GIT_CLEAN_COLOR=$FG[118]
GIT_PROMPT_INFO=$FG[012]
-PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} '
+PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%}%{$GIT_PROMPT_INFO%}$(git_prompt_info)$(virtualenv_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} '
#RPS1="${return_code}"
-ZSH_THEME_GIT_PROMPT_PREFIX="("
+ZSH_THEME_GIT_PROMPT_PREFIX=" ("
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘"
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔"
@@ -28,3 +28,6 @@ ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}"
+
+ZSH_THEME_VIRTUALENV_PREFIX=" ["
+ZSH_THEME_VIRTUALENV_SUFFIX="]"
diff --git a/themes/nebirhos.zsh-theme b/themes/nebirhos.zsh-theme
index a5a226b69..e2424465a 100644
--- a/themes/nebirhos.zsh-theme
+++ b/themes/nebirhos.zsh-theme
@@ -11,7 +11,7 @@ else
fi
# Get the host name (first 4 chars)
-HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$fg_bold[cyan]%}%c "
+HOST_PROMPT_="%{$fg_bold[red]%}@$HOST ➜ %{$fg_bold[cyan]%}%c "
GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}"
PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT"
diff --git a/themes/peepcode.zsh-theme b/themes/peepcode.zsh-theme
index ca2a8862f..b6dfa6870 100644
--- a/themes/peepcode.zsh-theme
+++ b/themes/peepcode.zsh-theme
@@ -28,7 +28,7 @@ git_dirty() {
}
git_prompt() {
- local cb=$(current_branch)
+ local cb=$(git_current_branch)
if [ -n "$cb" ]; then
local repo_path=$(git_repo_path)
echo " %{$fg_bold[grey]%}$cb %{$fg[white]%}$(git_commit_id)%{$reset_color%}$(git_mode)$(git_dirty)"
@@ -41,4 +41,4 @@ PROMPT='
%~
${smiley} %{$reset_color%}'
-RPROMPT='%{$fg[white]%} $(~/.rvm/bin/rvm-prompt)$(git_prompt)%{$reset_color%}'
+RPROMPT='%{$fg[white]%} $(ruby_prompt_info)$(git_prompt)%{$reset_color%}'
diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme
index f6e5b324e..fec734bad 100644
--- a/themes/philips.zsh-theme
+++ b/themes/philips.zsh-theme
@@ -9,6 +9,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="*"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.patch=00;34:*.o=00;32:*.so=01;35:*.ko=01;31:*.la=00;33'
diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme
index e4e45c71a..58a9b8bef 100644
--- a/themes/pmcgee.zsh-theme
+++ b/themes/pmcgee.zsh-theme
@@ -11,6 +11,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
diff --git a/themes/pygmalion-virtualenv.zsh-theme b/themes/pygmalion-virtualenv.zsh-theme
new file mode 100644
index 000000000..605e3d10c
--- /dev/null
+++ b/themes/pygmalion-virtualenv.zsh-theme
@@ -0,0 +1,49 @@
+# Yay! High voltage and arrows!
+
+
+function _virtualenv_prompt_info {
+ if [[ -n "$(whence virtualenv_prompt_info)" ]]; then
+ if [ -n "$(whence pyenv_prompt_info)" ]; then
+ if [ "$1" = "inline" ]; then
+ ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX=%{$fg[blue]%}"::%{$fg[red]%}"
+ ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX=""
+ virtualenv_prompt_info
+ fi
+ [ "$(pyenv_prompt_info)" = "${PYENV_PROMPT_DEFAULT_VERSION}" ] && virtualenv_prompt_info
+ else
+ virtualenv_prompt_info
+ fi
+ fi
+}
+
+prompt_setup_pygmalion(){
+ ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}"
+ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
+ ZSH_THEME_GIT_PROMPT_CLEAN=""
+
+ base_prompt='$(_virtualenv_prompt_info)%{$fg[magenta]%}%n%{$reset_color%}%{$fg[cyan]%}@%{$reset_color%}%{$fg[yellow]%}%m%{$reset_color%}%{$fg[red]%}:%{$reset_color%}%{$fg[cyan]%}%0~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}'
+ post_prompt='%{$fg[cyan]%}⇒%{$reset_color%} '
+
+ base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
+ post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
+
+ autoload -U add-zsh-hook
+ add-zsh-hook precmd prompt_pygmalion_precmd
+}
+
+prompt_pygmalion_precmd(){
+ local gitinfo=$(git_prompt_info)
+ local gitinfo_nocolor=$(echo "$gitinfo" | perl -pe "s/%\{[^}]+\}//g")
+ local exp_nocolor="$(print -P \"$base_prompt_nocolor$gitinfo_nocolor$post_prompt_nocolor\")"
+ local prompt_length=${#exp_nocolor}
+
+ local nl=""
+
+ if [[ $prompt_length -gt 40 ]]; then
+ nl=$'\n%{\r%}';
+ fi
+ PROMPT="$base_prompt$gitinfo$nl$post_prompt"
+}
+
+prompt_setup_pygmalion
diff --git a/themes/pygmalion.zsh-theme b/themes/pygmalion.zsh-theme
index 5f5fe7f9a..cd773e4a4 100644
--- a/themes/pygmalion.zsh-theme
+++ b/themes/pygmalion.zsh-theme
@@ -12,7 +12,8 @@ prompt_setup_pygmalion(){
base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
- precmd_functions+=(prompt_pygmalion_precmd)
+ autoload -U add-zsh-hook
+ add-zsh-hook precmd prompt_pygmalion_precmd
}
prompt_pygmalion_precmd(){
@@ -30,5 +31,3 @@ prompt_pygmalion_precmd(){
}
prompt_setup_pygmalion
-
-
diff --git a/themes/random.zsh-theme b/themes/random.zsh-theme
new file mode 100644
index 000000000..43f6cbb60
--- /dev/null
+++ b/themes/random.zsh-theme
@@ -0,0 +1,38 @@
+# Make themes a unique array
+typeset -Ua themes
+
+if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = array && ${#ZSH_THEME_RANDOM_CANDIDATES[@]} -gt 0 ]]; then
+ # Use ZSH_THEME_RANDOM_CANDIDATES if properly defined
+ themes=($ZSH_THEME_RANDOM_CANDIDATES)
+else
+ # Look for themes in $ZSH_CUSTOM and $ZSH and add only the theme name
+ themes=(
+ "$ZSH_CUSTOM"/*.zsh-theme(N:t:r)
+ "$ZSH_CUSTOM"/themes/*.zsh-theme(N:t:r)
+ "$ZSH"/themes/*.zsh-theme(N:t:r)
+ )
+ # Remove blacklisted themes from the list
+ for theme in ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
+ themes=("${(@)themes:#$theme}")
+ done
+fi
+
+# Choose a theme out of the pool of candidates
+N=${#themes[@]}
+(( N = (RANDOM%N) + 1 ))
+RANDOM_THEME="${themes[$N]}"
+unset N themes theme
+
+# Source theme
+if [[ -f "$ZSH_CUSTOM/$RANDOM_THEME.zsh-theme" ]]; then
+ source "$ZSH_CUSTOM/$RANDOM_THEME.zsh-theme"
+elif [[ -f "$ZSH_CUSTOM/themes/$RANDOM_THEME.zsh-theme" ]]; then
+ source "$ZSH_CUSTOM/themes/$RANDOM_THEME.zsh-theme"
+elif [[ -f "$ZSH/themes/$RANDOM_THEME.zsh-theme" ]]; then
+ source "$ZSH/themes/$RANDOM_THEME.zsh-theme"
+else
+ echo "[oh-my-zsh] Random theme '${RANDOM_THEME}' not found"
+ return 1
+fi
+
+echo "[oh-my-zsh] Random theme '${RANDOM_THEME}' loaded"
diff --git a/themes/pure.zsh-theme b/themes/refined.zsh-theme
index 1473194a5..2a4188c9d 100644
--- a/themes/pure.zsh-theme
+++ b/themes/refined.zsh-theme
@@ -61,7 +61,7 @@ cmd_exec_time() {
[ $elapsed -gt 5 ] && echo ${elapsed}s
}
-# Get the intial timestamp for cmd_exec_time
+# Get the initial timestamp for cmd_exec_time
#
preexec() {
cmd_timestamp=`date +%s`
@@ -72,6 +72,7 @@ preexec() {
precmd() {
vcs_info # Get version control info before we start outputting stuff
print -P "\n$(repo_information) %F{yellow}$(cmd_exec_time)%f"
+ unset cmd_timestamp #Reset cmd exec time.
}
# Define prompts
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index a3f1f3dfa..65a075456 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -1,13 +1,13 @@
-# 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
+# user, host, full path, and time/date on two lines for easier vgrepping
function hg_prompt_info {
+ if (( $+commands[hg] )) && grep -q "prompt" ~/.hgrc; then
hg prompt --angle-brackets "\
<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
+ fi
}
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}+"
@@ -23,14 +23,13 @@ function mygit() {
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 "
+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_short_sha)$(git_prompt_status)%{$fg_bold[blue]%}$ZSH_THEME_GIT_PROMPT_SUFFIX "
fi
}
function retcode() {}
# alternate prompt with git & hg
-PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
-%{\e[0;34m%}%B└─%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B] <$(mygit)$(hg_prompt_info)>%{\e[0m%}%b '
+PROMPT=$'%{$fg_bold[blue]%}┌─[%{$fg_bold[green]%}%n%b%{$fg[black]%}@%{$fg[cyan]%}%m%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%{$fg_bold[white]%}%~%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%b%{$fg[yellow]%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{$fg_bold[blue]%}]
+%{$fg_bold[blue]%}└─[%{$fg_bold[magenta]%}%?$(retcode)%{$fg_bold[blue]%}] <$(mygit)$(hg_prompt_info)>%{$reset_color%} '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
-
diff --git a/themes/rkj.zsh-theme b/themes/rkj.zsh-theme
index fe06161c8..d7c9314e3 100644
--- a/themes/rkj.zsh-theme
+++ b/themes/rkj.zsh-theme
@@ -1,6 +1,6 @@
# 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
+# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
function retcode() {}
diff --git a/themes/robbyrussell.zsh-theme b/themes/robbyrussell.zsh-theme
index 24e1e8c52..2fd5f2cdc 100644
--- a/themes/robbyrussell.zsh-theme
+++ b/themes/robbyrussell.zsh-theme
@@ -1,7 +1,7 @@
-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]%} % %{$reset_color%}'
+PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
+PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
-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_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme
index 63ce4261b..ef91c5ee3 100644
--- a/themes/simonoff.zsh-theme
+++ b/themes/simonoff.zsh-theme
@@ -23,7 +23,7 @@ function precmd {
local promptsize=${#${(%):---(%n@%M:%l)---()}}
local pwdsize=${#${(%):-%~}}
local gitbranch="$(git_prompt_info)"
- local rvmprompt="$(rvm_prompt_info)"
+ local rvmprompt="$(ruby_prompt_info)"
local gitbranchsize=${#${gitbranch:-''}}
local rvmpromptsize=${#${rvmprompt:-''}}
@@ -90,8 +90,8 @@ setprompt () {
ZSH_THEME_GIT_PROMPT_SUFFIX="]"
###
# Modify RVM prompt
- ZSH_THEME_RVM_PROMPT_PREFIX=" ["
- ZSH_THEME_RVM_PROMPT_SUFFIX="]"
+ ZSH_THEME_RUBY_PROMPT_PREFIX=" ["
+ ZSH_THEME_RUBY_PROMPT_SUFFIX="]"
###
diff --git a/themes/simple.zsh-theme b/themes/simple.zsh-theme
index a88d9d72a..8d0070ba7 100644
--- a/themes/simple.zsh-theme
+++ b/themes/simple.zsh-theme
@@ -1,4 +1,4 @@
-PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} '
+PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%})%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
diff --git a/themes/sorin.zsh-theme b/themes/sorin.zsh-theme
index ac6a49840..e478d2672 100644
--- a/themes/sorin.zsh-theme
+++ b/themes/sorin.zsh-theme
@@ -1,10 +1,10 @@
# sorin.zsh-theme
-# screenshot: http://i.imgur.com/aipDQ.png
+# screenshot: https://i.imgur.com/aipDQ.png
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
-
+
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
@@ -20,10 +20,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
-else
+else
MODE_INDICATOR="❮❮❮"
local return_status="%(?::⏎)"
-
+
PROMPT='%c$(git_prompt_info) %(!.#.❯) '
ZSH_THEME_GIT_PROMPT_PREFIX=" git:"
diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme
index db0fc4277..e008a8664 100644
--- a/themes/sporty_256.zsh-theme
+++ b/themes/sporty_256.zsh-theme
@@ -1,6 +1,6 @@
# zsh theme requires 256 color enabled terminal
# i.e TERM=xterm-256color
-# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
+# Preview - https://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
# based on robbyrussell's shell but louder!
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index 13728ca9a..3532d3bc7 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -1,16 +1,16 @@
# prompt style and colors based on Steve Losh's Prose theme:
-# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
+# https://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
#
# vcs_info modifications from Bart Trojanowski's zsh prompt:
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
#
# git untracked files modification from Brian Carper:
-# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
+# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt
export VIRTUAL_ENV_DISABLE_PROMPT=1
function virtualenv_info {
- [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
+ [ $VIRTUAL_ENV ] && echo '('%F{blue}`basename $VIRTUAL_ENV`%f') '
}
PR_GIT_UPDATE=1
@@ -19,19 +19,19 @@ setopt prompt_subst
autoload -U add-zsh-hook
autoload -Uz vcs_info
-#use extended color pallete if available
-if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
+#use extended color palette if available
+if [[ $terminfo[colors] -ge 256 ]]; then
turquoise="%F{81}"
orange="%F{166}"
purple="%F{135}"
hotpink="%F{161}"
limegreen="%F{118}"
else
- turquoise="$fg[cyan]"
- orange="$fg[yellow]"
- purple="$fg[magenta]"
- hotpink="$fg[red]"
- limegreen="$fg[green]"
+ turquoise="%F{cyan}"
+ orange="%F{yellow}"
+ purple="%F{magenta}"
+ hotpink="%F{red}"
+ limegreen="%F{green}"
fi
# enable VCS systems you use
@@ -48,7 +48,7 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
# %a - action (e.g. rebase-i)
# %R - repository path
# %S - path in the repository
-PR_RST="%{${reset_color}%}"
+PR_RST="%f"
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
FMT_UNSTAGED="%{$orange%}●"
@@ -62,10 +62,13 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats ""
function steeef_preexec {
- case "$(history $HISTCMD)" in
+ case "$2" in
*git*)
PR_GIT_UPDATE=1
;;
+ *hub*)
+ PR_GIT_UPDATE=1
+ ;;
*svn*)
PR_GIT_UPDATE=1
;;
@@ -96,5 +99,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)%{$reset_color%}
+%{$purple%}%n${PR_RST} at %{$orange%}%m${PR_RST} in %{$limegreen%}%~${PR_RST} $vcs_info_msg_0_$(virtualenv_info)
$ '
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/sunaku.zsh-theme b/themes/sunaku.zsh-theme
index 440fa90b4..77f3acc7b 100644
--- a/themes/sunaku.zsh-theme
+++ b/themes/sunaku.zsh-theme
@@ -1,5 +1,4 @@
# Git-centric variation of the "fishy" theme.
-# See screenshot at http://ompldr.org/vOHcwZg
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!"
diff --git a/themes/sunrise.zsh-theme b/themes/sunrise.zsh-theme
index 28befd01b..2111576c3 100644
--- a/themes/sunrise.zsh-theme
+++ b/themes/sunrise.zsh-theme
@@ -1,6 +1,5 @@
# Sunrise theme for oh-my-zsh
-# Intended to be used with Solarized: http://ethanschoonover.com/solarized
-# (Needs Git plugin for current_branch method)
+# Intended to be used with Solarized: https://ethanschoonover.com/solarized
# Color shortcuts
R=$fg_no_bold[red]
@@ -11,9 +10,9 @@ B=$fg_no_bold[blue]
RESET=$reset_color
if [ "$USER" = "root" ]; then
- PROMPTCOLOR="%{$R%}" PREFIX="-!-";
+ PROMPTCOLOR="%{$R%}" PROMPTPREFIX="-!-";
else
- PROMPTCOLOR="" PREFIX="---";
+ PROMPTCOLOR="" PROMPTPREFIX="---";
fi
local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
@@ -67,7 +66,7 @@ function custom_git_prompt() {
}
# %B sets bold text
-PROMPT='%B$PREFIX %2~ $(custom_git_prompt)%{$M%}%B»%b%{$RESET%} '
+PROMPT='%B$PROMPTPREFIX %2~ $(custom_git_prompt)%{$M%}%B»%b%{$RESET%} '
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$Y%}‹"
diff --git a/themes/suvash.zsh-theme b/themes/suvash.zsh-theme
index c87f64558..850476cdf 100644
--- a/themes/suvash.zsh-theme
+++ b/themes/suvash.zsh-theme
@@ -5,26 +5,17 @@ function prompt_char {
}
function virtualenv_info {
- [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
+ [[ -n "$VIRTUAL_ENV" ]] && echo '('${VIRTUAL_ENV:t}') '
}
-function collapse_pwd {
- echo $(pwd | sed -e "s,^$HOME,~,")
-}
-
-if which rvm-prompt &> /dev/null; then
- PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
-$(virtualenv_info)$(prompt_char) '
-else
- if which rbenv &> /dev/null; then
- PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%}
-$(virtualenv_info)$(prompt_char) '
- fi
-fi
+PROMPT='%F{magenta}%n%f at %F{yellow}%m%f in %B%F{green}%~%f%b$(git_prompt_info)$(ruby_prompt_info)
+$(virtualenv_info) $(prompt_char) '
+ZSH_THEME_GIT_PROMPT_PREFIX=' on %F{magenta}'
+ZSH_THEME_GIT_PROMPT_SUFFIX='%f'
+ZSH_THEME_GIT_PROMPT_DIRTY='%F{green}!'
+ZSH_THEME_GIT_PROMPT_UNTRACKED='%F{green}?'
+ZSH_THEME_GIT_PROMPT_CLEAN=''
-ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
-ZSH_THEME_GIT_PROMPT_CLEAN=""
+ZSH_THEME_RUBY_PROMPT_PREFIX=' using %F{red}'
+ZSH_THEME_RUBY_PROMPT_SUFFIX='%f'
diff --git a/themes/tjkirch.zsh-theme b/themes/tjkirch.zsh-theme
index 446cde724..c51609860 100644
--- a/themes/tjkirch.zsh-theme
+++ b/themes/tjkirch.zsh-theme
@@ -10,6 +10,6 @@ function prompt_char {
PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%}
)
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
-%_$(prompt_char) '
+$(prompt_char) '
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
diff --git a/themes/tjkirch_mod.zsh-theme b/themes/tjkirch_mod.zsh-theme
index 1b206a7e1..2dd060ea1 100644
--- a/themes/tjkirch_mod.zsh-theme
+++ b/themes/tjkirch_mod.zsh-theme
@@ -8,6 +8,6 @@ function prompt_char {
}
PROMPT='%(?,,%{$fg[red]%}FAIL: $?%{$reset_color%}
-)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %_$(prompt_char) '
+)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) $(prompt_char) '
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme
index a6407034c..426e2bf35 100644
--- a/themes/tonotdo.zsh-theme
+++ b/themes/tonotdo.zsh-theme
@@ -7,6 +7,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})"
-# LS colors, made with http://geoff.greer.fm/lscolors/
+# LS colors, made with https://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
-export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' \ No newline at end of file
+export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
index ca1676fb5..144d2549a 100644
--- a/themes/trapd00r.zsh-theme
+++ b/themes/trapd00r.zsh-theme
@@ -1,8 +1,9 @@
# 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
-# here: https://github.com/trapd00r/utils/blob/master/zsh_path
+# This theme needs a terminal supporting 256 colors as well as unicode.
+# In order to avoid external dependencies, it also has a zsh version of
+# the perl script at https://github.com/trapd00r/utils/blob/master/zsh_path,
+# which splits up the current path and makes it fancy.
#
# By default it spans over two lines like so:
#
@@ -20,37 +21,77 @@
autoload -U add-zsh-hook
autoload -Uz vcs_info
-local c0=$( printf "\e[m")
-local c1=$( printf "\e[38;5;245m")
-local c2=$( printf "\e[38;5;250m")
-local c3=$( printf "\e[38;5;242m")
-local c4=$( printf "\e[38;5;197m")
-local c5=$( printf "\e[38;5;225m")
-local c6=$( printf "\e[38;5;240m")
-local c7=$( printf "\e[38;5;242m")
-local c8=$( printf "\e[38;5;244m")
-local c9=$( printf "\e[38;5;162m")
-local c10=$(printf "\e[1m")
-local c11=$(printf "\e[38;5;208m\e[1m")
-local c12=$(printf "\e[38;5;142m\e[1m")
-local c13=$(printf "\e[38;5;196m\e[1m")
+local c0=$'\e[m'
+local c1=$'\e[38;5;245m'
+local c2=$'\e[38;5;250m'
+local c3=$'\e[38;5;242m'
+local c4=$'\e[38;5;197m'
+local c5=$'\e[38;5;225m'
+local c6=$'\e[38;5;240m'
+local c7=$'\e[38;5;242m'
+local c8=$'\e[38;5;244m'
+local c9=$'\e[38;5;162m'
+local c10=$'\e[1m'
+local c11=$'\e[38;5;208m\e[1m'
+local c12=$'\e[38;5;142m\e[1m'
+local c13=$'\e[38;5;196m\e[1m'
-# We dont want to use the extended colorset in the TTY / VC.
-if [ "$TERM" = "linux" ]; then
- c1=$( printf "\e[34;1m")
- c2=$( printf "\e[35m")
- c3=$( printf "\e[31m")
- c4=$( printf "\e[31;1m")
- c5=$( printf "\e[32m")
- c6=$( printf "\e[32;1m")
- c7=$( printf "\e[33m")
- c8=$( printf "\e[33;1m")
- c9=$( printf "\e[34m")
+zsh_path() {
+ local colors
+ colors=$(echoti colors)
- c11=$(printf "\e[35;1m")
- c12=$(printf "\e[36m")
- c13=$(printf "\e[31;1m")
+ local -A yellow
+ yellow=(
+ 1 '%F{228}' 2 '%F{222}' 3 '%F{192}' 4 '%F{186}'
+ 5 '%F{227}' 6 '%F{221}' 7 '%F{191}' 8 '%F{185}'
+ 9 '%F{226}' 10 '%F{220}' 11 '%F{190}' 12 '%F{184}'
+ 13 '%F{214}' 14 '%F{178}' 15 '%F{208}' 16 '%F{172}'
+ 17 '%F{202}' 18 '%F{166}'
+ )
+
+ local dir i=1
+ for dir (${(s:/:)PWD}); do
+ if [[ $i -eq 1 ]]; then
+ if [[ $colors -ge 256 ]]; then
+ print -Pn "%F{065}%B /%b"
+ else
+ print -Pn "\e[31;1m /"
+ fi
+ else
+ if [[ $colors -ge 256 ]]; then
+ print -Pn "${yellow[$i]:-%f} » "
+ else
+ print -Pn "%F{yellow} > "
+ fi
+ fi
+
+ (( i++ ))
+
+ if [[ $colors -ge 256 ]]; then
+ print -Pn "%F{065}$dir"
+ else
+ print -Pn "%F{blue}$dir"
+ fi
+ done
+ print -Pn "%f"
+}
+
+
+# We don't want to use the extended colorset in the TTY / VC.
+if [ "$TERM" = linux ]; then
+ c1=$'\e[34;1m'
+ c2=$'\e[35m'
+ c3=$'\e[31m'
+ c4=$'\e[31;1m'
+ c5=$'\e[32m'
+ c6=$'\e[32;1m'
+ c7=$'\e[33m'
+ c8=$'\e[33;1m'
+ c9=$'\e[34m'
+ c11=$'\e[35;1m'
+ c12=$'\e[36m'
+ c13=$'\e[31;1m'
fi
zstyle ':vcs_info:*' actionformats \
@@ -70,14 +111,12 @@ prompt_jnrowe_precmd () {
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
> '
-
-# modified, to be commited
+ # modified, to be committed
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
-
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
@@ -88,7 +127,5 @@ prompt_jnrowe_precmd () {
PROMPT='${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
-fi
+ fi
}
-
-# vim: set ft=zsh sw=2 et tw=0:
diff --git a/themes/wedisagree.zsh-theme b/themes/wedisagree.zsh-theme
index 9bdbce40d..07006ecd9 100644
--- a/themes/wedisagree.zsh-theme
+++ b/themes/wedisagree.zsh-theme
@@ -28,7 +28,7 @@ PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}$(git_prompt_ahead)%{$reset_color%}'
# Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name
-# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
+# $(ruby_prompt_info)
# local time, color coded by last return code
time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
@@ -48,6 +48,9 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➜" # ⓡ ⑄
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%} 𝝙"
+ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[yellow]%}"
+ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}"
+
# More symbols to choose from:
# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
diff --git a/themes/xiong-chiamiov-plus.zsh-theme b/themes/xiong-chiamiov-plus.zsh-theme
index 095dae290..aa6ef7421 100644
--- a/themes/xiong-chiamiov-plus.zsh-theme
+++ b/themes/xiong-chiamiov-plus.zsh-theme
@@ -1,6 +1,6 @@
# 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
-PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
+# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
+PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
diff --git a/themes/xiong-chiamiov.zsh-theme b/themes/xiong-chiamiov.zsh-theme
index 7c4c2e4f8..b67d9947c 100644
--- a/themes/xiong-chiamiov.zsh-theme
+++ b/themes/xiong-chiamiov.zsh-theme
@@ -1,6 +1,6 @@
# 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
-PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
+# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
+PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
index fd8adc41e..89d5355dc 100644
--- a/themes/ys.zsh-theme
+++ b/themes/ys.zsh-theme
@@ -1,18 +1,9 @@
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
-# It is recommended to use with a dark background and the font Inconsolata.
+# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
-#
-# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
-# Mar 2013 ys
-
-# Machine name.
-function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
-}
-
-# Directory info.
-local current_dir='${PWD/#$HOME/~}'
+#
+# Mar 2013 Yad Smood
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
@@ -21,7 +12,7 @@ YS_VCS_PROMPT_SUFFIX="%{$reset_color%}"
YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x"
YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o"
-# Git info.
+# Git info
local git_info='$(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
@@ -44,29 +35,26 @@ ys_hg_prompt_info() {
fi
}
-# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $
-PROMPT="
-%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
-%{$fg[cyan]%}%n \
-%{$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%}"
+local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})"
-if [[ "$USER" == "root" ]]; then
+# Prompt format:
+#
+# PRIVILEGES USER @ MACHINE in DIRECTORY on git:BRANCH STATE [TIME] C:LAST_EXIT_CODE
+# $ COMMAND
+#
+# For example:
+#
+# % ys @ ys-mbp in ~/.oh-my-zsh on git:master x [21:47:42] C:0
+# $
PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
-%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
-%{$fg[white]%}at \
-%{$fg[green]%}$(box_name) \
+%(#,%{$bg[yellow]%}%{$fg[black]%}%n%{$reset_color%},%{$fg[cyan]%}%n) \
+%{$fg[white]%}@ \
+%{$fg[green]%}%m \
%{$fg[white]%}in \
-%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
+%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${hg_info}\
-${git_info} \
-%{$fg[white]%}[%*]
+${git_info}\
+ \
+%{$fg[white]%}[%*] $exit_code
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
-fi