fc stands for Fix Command.
fc
fc OPTIONS FIRST LAST
-l
-i
-m
Print all the history:
fc -l 1
Print commands that have a pattern:
fc -lm '*docker*'