diff --git a/bashrc b/bashrc index c634db0..8caf0b5 100644 --- a/bashrc +++ b/bashrc @@ -64,3 +64,20 @@ fi > /dev/null . "$HOME/.cargo/env" alias backup='sudo borgmatic create --verbosity 1 --files' + +# Function to check for TODO.md and echo its contents +function check_todo() { +if [ -f "TODO.md" ]; then + echo + echo -e "\e[91mTODO.md\e[0m" + echo "---------------------------" + mdcat TODO.md + echo "---------------------------" + echo +fi +} +# Hook to execute check_todo when changing directories +cd() { + builtin cd "$@" + check_todo +}