From db8cda1e80e65b39e7d2d8b8f5f8a5b54c779181 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 24 Jun 2023 08:52:32 +0800 Subject: Update --- zsh/zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index d8043c6..2270cc3 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -48,8 +48,11 @@ function _get_context() { } function _already_sync_after_wakeup() { - latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) - if [ $latest -gt $(cat ~/.wakeup) ]; then + WAKEUP=~/.wakeup + [ ! -e "$WAKEUP" ] && return 0 + + latest=$(date -d @`stat -c %Y "$WAKEUP` +%s) + if [ $latest -gt $(cat "$WAKEUP") ]; then return 0 else return 1 -- cgit v1.2.3-70-g09d2