shells/zsh: only print TODO if file is not empty
This commit is contained in:
parent
5a1d0ab3ca
commit
18796cf4e2
1 changed files with 5 additions and 3 deletions
|
@ -25,10 +25,12 @@
|
|||
precmd() {
|
||||
precmd_any_nix_shell
|
||||
|
||||
if [[ -e ~/TODO.txt && ! -v __TODO_PRINTED ]] then
|
||||
if [[ -s ~/TODO.txt && ! -v __TODO_PRINTED ]] then
|
||||
export __TODO_PRINTED=1
|
||||
echo TODO:
|
||||
\cat ~/TODO.txt
|
||||
if [[ "$(cat ~/TODO.txt)" != "" ]] then
|
||||
echo TODO:
|
||||
\cat ~/TODO.txt
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue