summaryrefslogtreecommitdiff
path: root/themes/agnoster.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-09-14 17:59:42 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-09-14 17:59:42 -0600
commitf8ed4fd34c918a391b61d4d1cdcf748716a8afd9 (patch)
tree6f4732c2e7d6c73b2edff3f27ea15d2a88ed67b5 /themes/agnoster.zsh-theme
parentce4d8a5cadcccd79909d97e42099540cfa50b9c3 (diff)
downloadzsh-f8ed4fd34c918a391b61d4d1cdcf748716a8afd9.tar.gz
zsh-f8ed4fd34c918a391b61d4d1cdcf748716a8afd9.tar.bz2
zsh-f8ed4fd34c918a391b61d4d1cdcf748716a8afd9.zip
My mod
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r--themes/agnoster.zsh-theme10
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index da1f9b6e6..c6ded38d8 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -190,6 +190,15 @@ prompt_status() {
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
}
+prompt_cabal_sandbox() {
+ cabal_files=(*.cabal(N))
+ if [ $#cabal_files -gt 0 ]; then
+ if [ -f cabal.sandbox.config ]; then
+ prompt_segment cyan black "sandbox"
+ fi
+ fi
+}
+
## Main prompt
build_prompt() {
RETVAL=$?
@@ -198,6 +207,7 @@ build_prompt() {
prompt_context
prompt_dir
prompt_git
+ prompt_cabal_sandbox
prompt_hg
prompt_end
}