Skip to content

fc

Usage
fc [command_prefix]

Edits the last shell command – or the most recent one matching a prefix – in $EDITOR, then executes the result. Bash-style fc behaviour. Falls back to vi when $EDITOR is unset, and aborts without executing if the buffer is left empty.

Arguments:
command_prefix Search history for the newest command matching this
Returns:
The edited command's exit status, or a message when history lookup
found nothing.
Examples
fc
fc git