From 51e73dd48186af8533329ccb40b39c2646561a05 Mon Sep 17 00:00:00 2001 From: Michishige Kaito Date: Mon, 13 Feb 2017 13:04:16 +0000 Subject: [PATCH] Fix the call to `stat` Call `stat -c "%Y"` to get a file's modification timestamp. --- functions/fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index ff5c9be..8a1ea84 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -152,7 +152,7 @@ function _pure_async_git_fetch set -l git_fetch_required no if [ -e .git/FETCH_HEAD ] - set -l last_fetch_timestamp (command stat -f "%m" .git/FETCH_HEAD) + set -l last_fetch_timestamp (command stat -c "%Y" .git/FETCH_HEAD) set -l current_timestamp (_pure_timestamp) set -l time_since_last_fetch (math "$current_timestamp - $last_fetch_timestamp") if [ $time_since_last_fetch -gt (_pure_git_fetch_interval) ]