From 701c4cf1d0428cae313b5637cac9aeb69fa6e32b Mon Sep 17 00:00:00 2001 From: Felix Nehrke Date: Fri, 3 Jan 2025 16:58:11 +0100 Subject: [PATCH] Show warning when opening a new terminal and there are uncommitted changes to dotfiles --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 491b0ca..f146645 100644 --- a/.bashrc +++ b/.bashrc @@ -93,4 +93,6 @@ __git_complete c __git_main alias g=goto [ -s ~/Development/nemoinho/github.com/iridakos/goto/goto.sh ] && . ~/Development/nemoinho/github.com/iridakos/goto/goto.sh -[ -s /var/run/reboot-required ] && (>&2 echo -e "\n\e[01;31mReboot required to apply updates!\e[0m\n") +[ -s /var/run/reboot-required ] && (>&2 echo -e "\n\e[01;31mReboot required to apply updates"'!'"\e[0m\n") + +[ -n "$(config status --short)" ] && (>&2 echo -e "\n\e[01;33mCurrent configuration is not committed"'!'"\e[0m\nRun "'"'"\e[01mconfig status\e[0m"'"'" for further information\n")