diff options
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-x | radar-base.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh index d9cd8f5..58a28c1 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -484,3 +484,21 @@ show_remote_status() { fi return 0 } + +stashed_status() { + printf '%s' "$(git stash list | wc -l 2>/dev/null)" +} + +bash_stash_status() { + local number_stashes="$(stashed_status)" + 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="$(stashed_status)" + if [ $number_stashes -gt 0 ]; then + printf %s " $number_stashes%{$fg_bold[yellow]%}=%{$reset_color%}" + fi +} |