summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
committerTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
commitcae9a2b797649379e865e6bd73bc67e294e4ac77 (patch)
tree481419eff4bc761c3ca516704427394193473419 /themes
parent49edbf438ed690c76e6b2af80368c59404cf0167 (diff)
parent3427da4057dbe302933a7b5b19b4e23bfb9d0969 (diff)
downloadzsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.gz
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.bz2
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'themes')
-rw-r--r--themes/Soliah.zsh-theme4
-rw-r--r--themes/agnoster.zsh-theme17
-rw-r--r--themes/avit.zsh-theme2
-rw-r--r--themes/bureau.zsh-theme89
-rw-r--r--themes/candy-kingdom.zsh-theme4
-rw-r--r--themes/dieter.zsh-theme2
-rw-r--r--themes/dogenpunk.zsh-theme4
-rw-r--r--themes/emotty.zsh-theme10
-rw-r--r--themes/fino-time.zsh-theme5
-rw-r--r--themes/fino.zsh-theme4
-rw-r--r--themes/jonathan.zsh-theme2
-rw-r--r--themes/rkj-repos.zsh-theme2
-rw-r--r--themes/simple.zsh-theme10
-rw-r--r--themes/smt.zsh-theme2
-rw-r--r--themes/trapd00r.zsh-theme2
-rw-r--r--themes/wedisagree.zsh-theme4
-rw-r--r--themes/ys.zsh-theme10
17 files changed, 97 insertions, 76 deletions
diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme
index 070c54981..c3dd6af89 100644
--- a/themes/Soliah.zsh-theme
+++ b/themes/Soliah.zsh-theme
@@ -45,9 +45,7 @@ function rvm_gemset() {
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`
+ if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
now=`date +%s`
seconds_since_last_commit=$((now-last_commit))
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 4949aa83a..96190993a 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -135,7 +135,7 @@ prompt_git() {
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
- echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
+ echo -n "${${ref:gs/%/%%}/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
fi
}
@@ -153,7 +153,7 @@ prompt_bzr() {
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)
+ revision=${$(bzr log -r-1 --log-format line | cut -d: -f1):gs/%/%%}
if [[ $status_mod -gt 0 ]] ; then
prompt_segment yellow black "bzr@$revision ✚"
else
@@ -183,7 +183,7 @@ prompt_hg() {
# if working copy is clean
prompt_segment green $CURRENT_FG
fi
- echo -n $(hg prompt "☿ {rev}@{branch}") $st
+ echo -n ${$(hg prompt "☿ {rev}@{branch}"):gs/%/%%} $st
else
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
@@ -197,7 +197,7 @@ prompt_hg() {
else
prompt_segment green $CURRENT_FG
fi
- echo -n "☿ $rev@$branch" $st
+ echo -n "☿ ${rev:gs/%/%%}@${branch:gs/%/%%}" $st
fi
fi
}
@@ -209,9 +209,8 @@ prompt_dir() {
# Virtualenv: current working virtualenv
prompt_virtualenv() {
- local virtualenv_path="$VIRTUAL_ENV"
- if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
- prompt_segment blue black "(`basename $virtualenv_path`)"
+ if [[ -n "$VIRTUAL_ENV" && -n "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
+ prompt_segment blue black "(${VIRTUAL_ENV:t:gs/%/%%})"
fi
}
@@ -246,8 +245,8 @@ prompt_cabal_sandbox() {
prompt_aws() {
[[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
case "$AWS_PROFILE" in
- *-prod|*production*) prompt_segment red yellow "AWS: $AWS_PROFILE" ;;
- *) prompt_segment green black "AWS: $AWS_PROFILE" ;;
+ *-prod|*production*) prompt_segment red yellow "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
+ *) prompt_segment green black "AWS: ${AWS_PROFILE:gs/%/%%}" ;;
esac
}
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
index 1e20d8f9f..f90ba331b 100644
--- a/themes/avit.zsh-theme
+++ b/themes/avit.zsh-theme
@@ -31,7 +31,7 @@ function _git_time_since_commit() {
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
+ if last_commit=$(command git -c log.showSignature=false log --format='%at' -1 2>/dev/null); then
now=$(date +%s)
seconds_since_last_commit=$((now-last_commit))
diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
index 3b3bdc80f..698aa2ff8 100644
--- a/themes/bureau.zsh-theme
+++ b/themes/bureau.zsh-theme
@@ -16,65 +16,73 @@ ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}"
-bureau_git_branch () {
+bureau_git_info () {
+ local ref
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
echo "${ref#refs/heads/}"
}
bureau_git_status() {
- _STATUS=""
+ local result gitstatus
+ gitstatus="$(command git status --porcelain -b 2>/dev/null)"
# 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"
+ local gitfiles="$(tail -n +2 <<< "$gitstatus")"
+ if [[ -n "$gitfiles" ]]; then
+ if [[ "$gitfiles" =~ $'(^|\n)[AMRD]. ' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_STAGED"
fi
- if $(echo "$_INDEX" | command grep -q '^.[MTD] '); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
+ if [[ "$gitfiles" =~ $'(^|\n).[MTD] ' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
- if $(echo "$_INDEX" | command grep -q -E '^\?\? '); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
+ if [[ "$gitfiles" =~ $'(^|\n)\\?\\? ' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
- if $(echo "$_INDEX" | command grep -q '^UU '); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
+ if [[ "$gitfiles" =~ $'(^|\n)UU ' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
else
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
+ result+="$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
# 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"
+ local gitbranch="$(head -n 1 <<< "$gitstatus")"
+ if [[ "$gitbranch" =~ '^## .*ahead' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
- if $(echo "$_INDEX" | command grep -q '^## .*behind'); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND"
+ if [[ "$gitbranch" =~ '^## .*behind' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_BEHIND"
fi
- if $(echo "$_INDEX" | command grep -q '^## .*diverged'); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_DIVERGED"
+ if [[ "$gitbranch" =~ '^## .*diverged' ]]; then
+ result+="$ZSH_THEME_GIT_PROMPT_DIVERGED"
fi
- if $(command git rev-parse --verify refs/stash &> /dev/null); then
- _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_STASHED"
+ # check if there are stashed changes
+ if command git rev-parse --verify refs/stash &> /dev/null; then
+ result+="$ZSH_THEME_GIT_PROMPT_STASHED"
fi
- echo $_STATUS
+ echo $result
}
-bureau_git_prompt () {
- local _branch=$(bureau_git_branch)
- local _status=$(bureau_git_status)
- local _result=""
- if [[ "${_branch}x" != "x" ]]; then
- _result="$ZSH_THEME_GIT_PROMPT_PREFIX$_branch"
- if [[ "${_status}x" != "x" ]]; then
- _result="$_result $_status"
- fi
- _result="$_result$ZSH_THEME_GIT_PROMPT_SUFFIX"
+bureau_git_prompt() {
+ # check git information
+ local gitinfo=$(bureau_git_info)
+ if [[ -z "$gitinfo" ]]; then
+ return
+ fi
+
+ # quote % in git information
+ local output="${gitinfo:gs/%/%%}"
+
+ # check git status
+ local gitstatus=$(bureau_git_status)
+ if [[ -n "$gitstatus" ]]; then
+ output+=" $gitstatus"
fi
- echo $_result
+
+ echo "${ZSH_THEME_GIT_PROMPT_PREFIX}${output}${ZSH_THEME_GIT_PROMPT_SUFFIX}"
}
@@ -95,19 +103,14 @@ get_space () {
local STR=$1$2
local zero='%([BSUbfksu]|([FB]|){*})'
local LENGTH=${#${(S%%)STR//$~zero/}}
- local SPACES=""
- (( LENGTH = ${COLUMNS} - $LENGTH - 1))
-
- for i in {0..$LENGTH}
- do
- SPACES="$SPACES "
- done
+ local SPACES=$(( COLUMNS - LENGTH - ${ZLE_RPROMPT_INDENT:-1} ))
- echo $SPACES
+ (( SPACES > 0 )) || return
+ printf ' %.0s' {1..$SPACES}
}
_1LEFT="$_USERNAME $_PATH"
-_1RIGHT="[%*] "
+_1RIGHT="[%*]"
bureau_precmd () {
_1SPACES=`get_space $_1LEFT $_1RIGHT`
diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme
index ad03cc320..31e63df15 100644
--- a/themes/candy-kingdom.zsh-theme
+++ b/themes/candy-kingdom.zsh-theme
@@ -11,7 +11,9 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
fi
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
+ local box="${SHORT_HOST:-$HOST}"
+ [[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
+ echo "${box:gs/%/%%}"
}
PROMPT='
diff --git a/themes/dieter.zsh-theme b/themes/dieter.zsh-theme
index 58d9f88a9..83f2dcc7c 100644
--- a/themes/dieter.zsh-theme
+++ b/themes/dieter.zsh-theme
@@ -6,7 +6,7 @@
# The exit code visual cues will only display once.
# (i.e. they will be reset, even if you hit enter a few times on empty command prompts)
-typeset -A host_repr
+typeset -g -A host_repr
# translate hostnames into shortened, colorcoded strings
host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme
index 6a9921288..923ca74bc 100644
--- a/themes/dogenpunk.zsh-theme
+++ b/themes/dogenpunk.zsh-theme
@@ -37,9 +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 -n 1 > /dev/null 2>&1; then
- # Get the last commit.
- last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
+ if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
now=`date +%s`
seconds_since_last_commit=$((now-last_commit))
diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme
index 044b317e8..ba0840950 100644
--- a/themes/emotty.zsh-theme
+++ b/themes/emotty.zsh-theme
@@ -46,6 +46,16 @@
# is shown (see vcs_action_glyph variable, default: chevron).
# ------------------------------------------------------------------------------
+(( ${+functions[emotty]} )) || {
+ echo "error: the emotty theme requires the emotty plugin" >&2
+ return 1
+}
+
+(( ${+emoji} )) || {
+ echo "error: the emotty theme requires the emoji plugin" >&2
+ return 1
+}
+
user_prompt="$(emotty)"
root_prompt="$emoji[skull]"
warn_prompt="$emoji[collision_symbol]"
diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
index 57c47db02..c7e2d965e 100644
--- a/themes/fino-time.zsh-theme
+++ b/themes/fino-time.zsh-theme
@@ -21,10 +21,11 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
+ local box="${SHORT_HOST:-$HOST}"
+ [[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
+ echo "${box:gs/%/%%}"
}
-
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_prompt_info)\$(ruby_prompt_info) %D - %*
╰─\$(virtualenv_info)\$(prompt_char) "
diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
index 2523c1776..9365a3c42 100644
--- a/themes/fino.zsh-theme
+++ b/themes/fino.zsh-theme
@@ -21,7 +21,9 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
+ local box="${SHORT_HOST:-$HOST}"
+ [[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
+ echo "${box:gs/%/%%}"
}
local ruby_env='$(ruby_prompt_info)'
diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
index 11d799a84..e8c490884 100644
--- a/themes/jonathan.zsh-theme
+++ b/themes/jonathan.zsh-theme
@@ -66,7 +66,7 @@ if [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
PR_LRCORNER="┘"
PR_URCORNER="┐"
else
- typeset -A altchar
+ typeset -g -A altchar
set -A altchar ${(s..)terminfo[acsc]}
# Some stuff to help us draw nice lines
PR_SET_CHARSET="%{$terminfo[enacs]%}"
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index 65a075456..3cb452335 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -30,6 +30,6 @@ function mygit() {
function retcode() {}
# alternate prompt with git & hg
-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]%}]
+PROMPT=$'%{$fg_bold[blue]%}┌─[%{$fg_bold[green]%}%n%b%{$fg[black]%}@%{$fg[cyan]%}%m%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%{$fg_bold[default]%}%~%{$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/simple.zsh-theme b/themes/simple.zsh-theme
index 8d0070ba7..bcdecc1a5 100644
--- a/themes/simple.zsh-theme
+++ b/themes/simple.zsh-theme
@@ -1,6 +1,6 @@
-PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%})%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} '
+PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%})%~$(git_prompt_info)%{$reset_color%} '
-ZSH_THEME_GIT_PROMPT_PREFIX="("
-ZSH_THEME_GIT_PROMPT_SUFFIX=")"
-ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
-ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
+ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[blue]%}("
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[blue]%})"
+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗"
+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔"
diff --git a/themes/smt.zsh-theme b/themes/smt.zsh-theme
index 7f54472c6..52e6d9a21 100644
--- a/themes/smt.zsh-theme
+++ b/themes/smt.zsh-theme
@@ -40,7 +40,7 @@ function git_time_since_commit() {
local last_commit seconds_since_last_commit
# Only proceed if there is actually a commit
- if ! last_commit=$(command git log --pretty=format:'%at' -1 2>/dev/null); then
+ if ! last_commit=$(command git -c log.showSignature=false log --pretty=format:'%at' -1 2>/dev/null); then
echo "[$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL~%{$reset_color%}]"
return
fi
diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
index 4e3238393..849daf30b 100644
--- a/themes/trapd00r.zsh-theme
+++ b/themes/trapd00r.zsh-theme
@@ -38,6 +38,8 @@ local c13=$'\e[38;5;196m\e[1m'
zsh_path() {
+ setopt localoptions nopromptsubst
+
local colors
colors=$(echoti colors)
diff --git a/themes/wedisagree.zsh-theme b/themes/wedisagree.zsh-theme
index 07006ecd9..e9e9d6ef8 100644
--- a/themes/wedisagree.zsh-theme
+++ b/themes/wedisagree.zsh-theme
@@ -69,9 +69,7 @@ function rvm_gemset() {
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`
+ if last_commit=`git -c log.showSignature=false log --pretty=format:'%at' -1 2> /dev/null`; then
now=`date +%s`
seconds_since_last_commit=$((now-last_commit))
diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
index 45bbae2d1..4c3c56ffc 100644
--- a/themes/ys.zsh-theme
+++ b/themes/ys.zsh-theme
@@ -19,6 +19,13 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
+# SVN info
+local svn_info='$(svn_prompt_info)'
+ZSH_THEME_SVN_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}svn${YS_VCS_PROMPT_PREFIX2}"
+ZSH_THEME_SVN_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
+ZSH_THEME_SVN_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
+ZSH_THEME_SVN_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
+
# HG info
local hg_info='$(ys_hg_prompt_info)'
ys_hg_prompt_info() {
@@ -42,7 +49,7 @@ local venv_info='$(virtenv_prompt)'
YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}"
YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%"
virtenv_prompt() {
- [[ -n ${VIRTUAL_ENV} ]] || return
+ [[ -n "${VIRTUAL_ENV:-}" ]] || return
echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}"
}
@@ -66,6 +73,7 @@ PROMPT="
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${hg_info}\
${git_info}\
+${svn_info}\
${venv_info}\
\
[%*] $exit_code