From 420b61bf28bb9b8db166f5979a589547102258b8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 24 Nov 2020 17:17:12 +0100 Subject: Add a bash prompt notification for dirty/outdated dotfiles. --- bash/prompt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bash') diff --git a/bash/prompt b/bash/prompt index b4a1b87..09a75c7 100755 --- a/bash/prompt +++ b/bash/prompt @@ -83,8 +83,10 @@ __prompt_func() { local prompt_usertype_sign="\\$" local prompt_git_branch="$white\$(__git_ps1)$normal" + local dotfiles_dirty="$red\$([ -f ~/.local/var/dotfiles/dirty ] && echo -n \\\!\ )$normal" + # # # # # # # # #FINAL PROMPT # # # # # # # # - echo -n "$prompt_opening_brace $prompt_username@$prompt_hostname_short $prompt_pwd_long$prompt_git_branch$prompt_closing_brace$prompt_usertype_sign " + echo -n "$prompt_opening_brace $dotfiles_dirty$prompt_username@$prompt_hostname_short $prompt_pwd_long$prompt_git_branch$prompt_closing_brace$prompt_usertype_sign " } -- cgit v1.2.3