From 230b2ed9595c113f03ffb26c6394cd47b9014fd5 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Mon, 24 Oct 2022 05:23:52 -0500 Subject: [PATCH] Add a TTL to the directory cache --- dotlib/cattle.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dotlib/cattle.sh b/dotlib/cattle.sh index cc2dac0..54fa596 100644 --- a/dotlib/cattle.sh +++ b/dotlib/cattle.sh @@ -34,11 +34,20 @@ reaper_pid=$! PROMPT_COMMAND+=(ping-timer) trap slay-reaper EXIT if [[ -f /tmp/iterm2-prev-dir.txt ]]; then - dir=$( 1200 )); then + rm -f /tmp/iterm2-prev-dir.txt + else + dir=$(