From 71e4a166cfd6c2cbd3b8ef7b48629c8cc30e10d2 Mon Sep 17 00:00:00 2001 From: Jonathen Russell Date: Mon, 2 Jul 2018 03:15:54 +1000 Subject: simple theme: indication of privileges (#3728) I found this quite annoying not being in this theme after switching from gentoo-theme, it's helpful and it doesn't detract from simplicity. --- themes/simple.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes') 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=")" -- cgit v1.2.3-70-g09d2 From 3a7a5908626c977e9fccaceda3ffeba67c5f1548 Mon Sep 17 00:00:00 2001 From: nyim Date: Mon, 2 Jul 2018 02:41:52 +0800 Subject: mortalscumbag add icon showing local branch behind (#4364) --- themes/mortalscumbag.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'themes') diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 55ece9760..8c7b0f5d1 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -9,6 +9,11 @@ function my_git_prompt() { STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD" fi + # is branch behind? + if $(echo "$(git log HEAD..origin/$(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" @@ -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]%}●" -- cgit v1.2.3-70-g09d2 From f09fed61957928605e8eccc54aaf9dac398214ed Mon Sep 17 00:00:00 2001 From: Unknown-Guy Date: Tue, 3 Jul 2018 18:37:18 +0300 Subject: change mortalscumbag to use core git_current_branch (#6965) --- themes/mortalscumbag.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes') diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 8c7b0f5d1..d81a7ca06 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -10,7 +10,7 @@ function my_git_prompt() { fi # is branch behind? - if $(echo "$(git log HEAD..origin/$(current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then + 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 -- cgit v1.2.3-70-g09d2