浏览代码

fix(history): add `t` option to history wrapper (#12365)

The `t` option takes a strftime format specification as argument. This
fixes cases in which $HIST_STAMPS is set to a value other than
`mm/dd/yyyy|dd.mm.yyyy|yyyy-mm-dd`.
Martin Hans 1 年之前
父节点
当前提交
d17ca487a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/history.zsh

+ 1 - 1
lib/history.zsh

@@ -2,7 +2,7 @@
 function omz_history {
 function omz_history {
   # parse arguments and remove from $@
   # parse arguments and remove from $@
   local clear list stamp
   local clear list stamp
-  zparseopts -E -D c=clear l=list f=stamp E=stamp i=stamp
+  zparseopts -E -D c=clear l=list f=stamp E=stamp i=stamp t:=stamp
 
 
   if [[ -n "$clear" ]]; then
   if [[ -n "$clear" ]]; then
     # if -c provided, clobber the history file
     # if -c provided, clobber the history file