aboutsummaryrefslogtreecommitdiffhomepage
path: root/zsh/zshrc
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-06-24 08:52:32 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-06-24 08:52:46 +0800
commitdb8cda1e80e65b39e7d2d8b8f5f8a5b54c779181 (patch)
treead03b1b4e668f9cbf0bc29c6f1700d11d852f9df /zsh/zshrc
parent04b0b9e6e22f5ae1950831fd58ab5ee0a0600bde (diff)
Update
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc7
1 files 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() {
48} 48}
49 49
50function _already_sync_after_wakeup() { 50function _already_sync_after_wakeup() {
51 latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) 51 WAKEUP=~/.wakeup
52 if [ $latest -gt $(cat ~/.wakeup) ]; then 52 [ ! -e "$WAKEUP" ] && return 0
53
54 latest=$(date -d @`stat -c %Y "$WAKEUP` +%s)
55 if [ $latest -gt $(cat "$WAKEUP") ]; then
53 return 0 56 return 0
54 else 57 else
55 return 1 58 return 1