aboutsummaryrefslogtreecommitdiffhomepage
path: root/zsh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-07-11 09:51:46 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-07-11 09:51:46 +0800
commitdda043def4ded78157919e52136f2a353ae0d519 (patch)
tree4e61b1a0c05f3a16618ff3866f8f359a660df2ea /zsh
parent4d32f63efbfc776be01ea9525f5ccff21aca2051 (diff)
Update
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshrc5
1 files changed, 3 insertions, 2 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 19227cd..05d3e9e 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -48,10 +48,11 @@ function _get_context() {
48} 48}
49 49
50function _already_sync_after_wakeup() { 50function _already_sync_after_wakeup() {
51 WAKEUP="~/.wakeup" 51 WAKEUP="$HOME/.wakeup"
52 [ ! -e "$WAKEUP" ] && return 0 52 [ ! -e "$WAKEUP" ] && return 0
53 53
54 latest=$(date -d @`stat -c %Y "$WAKEUP` +%s) 54 latest=$(date -d @`stat -c %X "$WAKEUP"` +%s)
55 # If sync time is older than wakeup time (timestamp in file), then return false
55 if [ $latest -gt $(cat "$WAKEUP") ]; then 56 if [ $latest -gt $(cat "$WAKEUP") ]; then
56 return 0 57 return 0
57 else 58 else