shells/zsh: only print TODO if file is not empty

This commit is contained in:
Infinidoge 2023-10-30 20:43:15 -04:00
parent 5a1d0ab3ca
commit 18796cf4e2

View file

@ -25,11 +25,13 @@
precmd() { precmd() {
precmd_any_nix_shell precmd_any_nix_shell
if [[ -e ~/TODO.txt && ! -v __TODO_PRINTED ]] then if [[ -s ~/TODO.txt && ! -v __TODO_PRINTED ]] then
export __TODO_PRINTED=1 export __TODO_PRINTED=1
if [[ "$(cat ~/TODO.txt)" != "" ]] then
echo TODO: echo TODO:
\cat ~/TODO.txt \cat ~/TODO.txt
fi fi
fi
} }
if [[ "$(basename "$(readlink "/proc/$PPID/exe")")" == ".kitty-wrapped" ]]; then if [[ "$(basename "$(readlink "/proc/$PPID/exe")")" == ".kitty-wrapped" ]]; then