LANGUAGE » SHELL_SCRIPT » ZSH

Fc

Usage

fc stands for Fix Command.

shell
fc OPTIONS FIRST LAST
OptionDescription
-lSend the result to stdout.
-iAdd timestamp.
-mSearch for a pattern.

Example

Print all the history:

shell
fc -l 1

Print commands that have a pattern:

shell
fc -lm '*docker*'