This commit is contained in:
Ray Elliott 2024-05-06 22:25:08 +01:00
parent 90a1db596e
commit bee848ee73
1 changed files with 14 additions and 2 deletions

16
bashrc
View File

@ -151,7 +151,7 @@ if [ $_updates_available -gt 0 ] ; then
fi
echo ""
echo -e "Remember \"\033[1;34mTODO.md\033[0m\" files have content automatically displayed."
echo -e "Remember \"\033[1;34mTODO.md\033[0m\" and \"\033[1;34mautonote.md\033[0m\" files have content automatically displayed."
echo ""
. "$HOME/.config/bash/cheat.bash"
@ -175,10 +175,22 @@ if [ -f "TODO.md" ]; then
echo
fi
}
# Hook to execute check_todo when changing directories
# Function to check for .autonote.md and echo its contents
function check_autonote() {
if [ -f ".autonote.md" ]; then
echo
echo -e "\e[91autonote.md\e[0m"
echo "---------------------------"
mdcat autonote.md
echo "---------------------------"
echo
fi
}
# Hook to execute check_todo, check_autonote when changing directories
cd() {
builtin cd "$@"
check_todo
check_autonote
}
random-bg() {