summaryrefslogtreecommitdiff
path: root/themes/agnoster.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-10-09 14:46:47 -0400
committerTuowen Zhao <ztuowen@gmail.com>2018-10-09 14:46:47 -0400
commit075160b86c64045e661209ad7906559068b44104 (patch)
treea910a6eef6163d39859395bb0b416b2b184db9ac /themes/agnoster.zsh-theme
parent5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (diff)
parent3c9942c4884089b290ef750468b29419ca0de271 (diff)
downloadzsh-075160b86c64045e661209ad7906559068b44104.tar.gz
zsh-075160b86c64045e661209ad7906559068b44104.tar.bz2
zsh-075160b86c64045e661209ad7906559068b44104.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r--themes/agnoster.zsh-theme7
1 files changed, 5 insertions, 2 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 164b0c552..87fb2f4ef 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -96,6 +96,9 @@ prompt_context() {
# 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"
@@ -212,8 +215,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}%}⚙"