fc
Synopsis
Section titled “Synopsis”fc [command_prefix]Description
Section titled “Description”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
Section titled “Arguments”command_prefix |
Search history for the newest command matching this |
Exit Status
Section titled “Exit Status”The edited command’s exit status, or a message when history lookup found nothing.
Example
Section titled “Example”fcfc gitClassification: bypasses-shadow(rm), self-limiting(cat)