aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index ca735e50..a6cd9afe 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5084,8 +5084,11 @@ function _p9k_timewarrior_clear() {
}
function prompt_timewarrior() {
+ local dir
+ [[ -n ${dir::=$TIMEWARRIORDB} || -n ${dir::=~/.timewarrior}(#qN/) ]] ||
+ dir=${XDG_DATA_HOME:-~/.local/share}/timewarrior
+ dir+=/data
local -a stat
- local dir=${TIMEWARRIORDB:-~/.timewarrior}/data
[[ $dir == $_p9k_timewarrior_dir ]] || _p9k_timewarrior_clear
if [[ -n $_p9k_timewarrior_file_name ]]; then
zstat -A stat +mtime -- $dir $_p9k_timewarrior_file_name 2>/dev/null || stat=()