summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprompt.bash1
-rwxr-xr-xradar-base.sh14
2 files changed, 15 insertions, 0 deletions
diff --git a/prompt.bash b/prompt.bash
index a3fe420..4d9a36f 100755
--- a/prompt.bash
+++ b/prompt.bash
@@ -10,4 +10,5 @@ if is_repo; then
bash_color_local_commits
printf "\x01\033[1;30m\x02)\x01\033[0m\x02"
bash_color_changes_status
+ bash_stash_status
fi
diff --git a/radar-base.sh b/radar-base.sh
index b7074d8..aa8ed2f 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -469,3 +469,17 @@ zsh_color_remote_commits() {
printf %s "$remote"
}
+
+bash_stash_status() {
+ local number_stashes="$(git stash list | wc -l)"
+ if [ $number_stashes -gt 0 ]; then
+ printf " $number_stashes\x01\033[1;33m\x02␣\x01\033[0m\x02)"
+ fi
+}
+
+zsh_stash_status() {
+ local number_stashes="$(git stash list | wc -l)"
+ if [ $number_stashes -gt 0 ]; then
+ printf %s " $number_stashes%{$fg_bold[yellow]%}␣%{$reset_color%})"
+ fi
+} \ No newline at end of file