From d06bdb51317569d824821018286fd94e22328f25 Mon Sep 17 00:00:00 2001 From: Alexis Hovorka Date: Mon, 1 May 2023 14:19:36 -0600 Subject: [fix] Initialize tmux hint file if absent --- base/tmux/status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/tmux') diff --git a/base/tmux/status b/base/tmux/status index 6643d46..c67c232 100755 --- a/base/tmux/status +++ b/base/tmux/status @@ -39,7 +39,7 @@ if tmux showenv TMUX_SHOW_TASK &>/dev/null; then elif tmux showenv TMUX_SHOW_HINT &>/dev/null; then HINTF="$(dirname "$0")/hint" HINTS="${HINTF}s" - if [[ "$(find "$HINTF" -mmin +2)" ]]; then + if [[ ! -f "$HINTF" || "$(find "$HINTF" -mmin +2)" ]]; then grep -v '^//' "$HINTS"* | shuf | head -n1 >"$HINTF" fi -- cgit v1.2.3-70-g09d2