mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-01 05:42:21 +00:00
38 lines
611 B
Plaintext
38 lines
611 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# fc
|
|
|
|
> Open the most recent command for editing and then run it.
|
|
> More information: <https://manned.org/fc>.
|
|
|
|
- Open the last command in the default system editor and run it after editing:
|
|
|
|
`fc`
|
|
|
|
- Specify an editor to open with:
|
|
|
|
`fc -e {{'emacs'}}`
|
|
|
|
- List recent commands from history:
|
|
|
|
`fc -l`
|
|
|
|
- List recent commands in reverse order:
|
|
|
|
`fc -l -r`
|
|
|
|
- Edit and run a command from history:
|
|
|
|
`fc {{number}}`
|
|
|
|
- Edit commands in a given interval and run them:
|
|
|
|
`fc '{{416}}' '{{420}}'`
|
|
|
|
- Display help:
|
|
|
|
`fc --help`
|