40c2a72e03b1df100b3937dd44a9754f17c06c6d

Author
Kirill Fedorov <mistake.klg@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(history): handle HIST_STAMPS with whitespace in timestamp format (#13099)

Co-authored-by: Kirill Fedorov <kfedorov@ibsys.ru>

Diff

 1diff --git a/lib/history.zsh b/lib/history.zsh
 2index 35da57de27cd6b2abf42815cbb296e8aff28e640..781a0e9deecf7de41acb86be70efe4f02bdff85d 100644
 3--- a/lib/history.zsh
 4+++ b/lib/history.zsh
 5@@ -18,10 +18,10 @@ function omz_history {
 6     print -u2 History file deleted.
 7   elif [[ $# -eq 0 ]]; then
 8     # if no arguments provided, show full history starting from 1
 9-    builtin fc $stamp -l 1
10+    builtin fc "${stamp[@]}" -l 1
11   else
12     # otherwise, run `fc -l` with a custom format
13-    builtin fc $stamp -l "$@"
14+    builtin fc "${stamp[@]}" -l "$@"
15   fi
16 }
17