diff options
author | Alexis Hovorka <[email protected]> | 2023-05-01 14:19:36 -0600 |
---|---|---|
committer | Alexis Hovorka <[email protected]> | 2023-05-01 14:19:36 -0600 |
commit | d06bdb51317569d824821018286fd94e22328f25 (patch) | |
tree | 10675d3cb68c62cd1a00c5564e6774ed24395168 /base/tmux | |
parent | 7afa24fc137884edd77925d10ab928cd1cc3adc0 (diff) |
[fix] Initialize tmux hint file if absent
Diffstat (limited to 'base/tmux')
-rwxr-xr-x | base/tmux/status | 2 |
1 files changed, 1 insertions, 1 deletions
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 |