1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-15 18:30:08 +00:00

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`.
This commit is contained in:
Martin Hans 2024-04-18 10:49:34 +02:00 committed by GitHub
parent 80a651a6df
commit d17ca487a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
function omz_history {
# parse arguments and remove from $@
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 -c provided, clobber the history file