summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/Soliah.zsh-theme11
-rw-r--r--themes/agnoster.zsh-theme14
-rw-r--r--themes/bureau.zsh-theme2
-rw-r--r--themes/fino.zsh-theme2
-rw-r--r--themes/gnzh.zsh-theme4
-rw-r--r--themes/half-life.zsh-theme9
-rw-r--r--themes/pygmalion.zsh-theme2
-rw-r--r--themes/steeef.zsh-theme2
-rw-r--r--themes/terminalparty.zsh-theme3
9 files changed, 29 insertions, 20 deletions
diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme
index 237e70fda..070c54981 100644
--- a/themes/Soliah.zsh-theme
+++ b/themes/Soliah.zsh-theme
@@ -32,11 +32,12 @@ function check_git_prompt_info() {
# Determine if we are using a gemset.
function rvm_gemset() {
- GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
- if [[ -n $GEMSET ]]; then
- echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
- fi
-
+ if hash rvm 2>/dev/null; then
+ GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
+ if [[ -n $GEMSET ]]; then
+ echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
+ fi
+ fi
}
# Determine the time since last commit. If branch is clean,
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 85b846cb5..2b33c48bc 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -69,7 +69,9 @@ prompt_context() {
# Git: branch/detached head, dirty status
prompt_git() {
- local ref dirty
+ local ref dirty mode repo_path
+ repo_path=$(git rev-parse --git-dir 2>/dev/null)
+
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
@@ -79,6 +81,14 @@ prompt_git() {
prompt_segment green black
fi
+ if [[ -e "${repo_path}/BISECT_LOG" ]]; then
+ mode=" <B>"
+ elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
+ mode=" >M<"
+ elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
+ mode=" >R>"
+ fi
+
setopt promptsubst
autoload -Uz vcs_info
@@ -90,7 +100,7 @@ prompt_git() {
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
- echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }"
+ echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}"
fi
}
diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
index 4d9cae0cc..443d1d5ee 100644
--- a/themes/bureau.zsh-theme
+++ b/themes/bureau.zsh-theme
@@ -70,7 +70,7 @@ bureau_git_prompt () {
_PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
-if [[ "%#" == "#" ]]; then
+if [[ $EUID -eq 0 ]]; then
_USERNAME="%{$fg_bold[red]%}%n"
_LIBERTY="%{$fg[red]%}#"
else
diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
index 35e6e02c1..411dec9b9 100644
--- a/themes/fino.zsh-theme
+++ b/themes/fino.zsh-theme
@@ -35,7 +35,7 @@ local prompt_char='$(prompt_char)'
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env}
-╰─${prompt_char} "
+╰─${prompt_char}%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index 33f187bc6..0519fbefb 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
eval PR_BOLD="%{$terminfo[bold]%}"
# Check the UID
-if [[ $UID -ge 1000 ]]; then # normal user
+if [[ $UID -ne 0 ]]; then # normal user
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
-elif [[ $UID -eq 0 ]]; then # root
+else # root
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
index c8d09ce47..942affa94 100644
--- a/themes/half-life.zsh-theme
+++ b/themes/half-life.zsh-theme
@@ -51,8 +51,8 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
PR_RST="%{${reset_color}%}"
FMT_BRANCH=" on %{$turquoise%}%b%u%c${PR_RST}"
FMT_ACTION=" performing a %{$limegreen%}%a${PR_RST}"
-FMT_UNSTAGED="%{$orange%}●"
-FMT_STAGED="%{$limegreen%}●"
+FMT_UNSTAGED="%{$orange%} ●"
+FMT_STAGED="%{$limegreen%} ●"
zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}"
zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}"
@@ -83,7 +83,7 @@ function steeef_precmd {
# check for untracked files or updated submodules, since vcs_info doesn't
if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
PR_GIT_UPDATE=1
- FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST}"
+ FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%} ●${PR_RST}"
else
FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c${PR_RST}"
fi
@@ -95,5 +95,4 @@ function steeef_precmd {
}
add-zsh-hook precmd steeef_precmd
-PROMPT=$'
-%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
+PROMPT=$'%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
diff --git a/themes/pygmalion.zsh-theme b/themes/pygmalion.zsh-theme
index 654e0fc37..5f5fe7f9a 100644
--- a/themes/pygmalion.zsh-theme
+++ b/themes/pygmalion.zsh-theme
@@ -12,7 +12,7 @@ prompt_setup_pygmalion(){
base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g")
post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g")
- add-zsh-hook precmd prompt_pygmalion_precmd
+ precmd_functions+=(prompt_pygmalion_precmd)
}
prompt_pygmalion_precmd(){
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index e0080b8a5..9d27410b8 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
function steeef_precmd {
if [[ -n "$PR_GIT_UPDATE" ]] ; then
# check for untracked files or updated submodules, since vcs_info doesn't
- if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then
+ if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then
PR_GIT_UPDATE=1
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
else
diff --git a/themes/terminalparty.zsh-theme b/themes/terminalparty.zsh-theme
index 216ce37eb..cd7370bba 100644
--- a/themes/terminalparty.zsh-theme
+++ b/themes/terminalparty.zsh-theme
@@ -1,4 +1,4 @@
-PROMPT='%{$fg[green]%} %% '
+PROMPT='%(?,%{$fg[green]%},%{$fg[red]%}) %% '
# RPS1='%{$fg[blue]%}%~%{$reset_color%} '
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}'
@@ -6,4 +6,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}"
-