2018-11-25 08:27:30 -07:00
|
|
|
# fc
|
|
|
|
|
2024-10-07 17:00:13 +03:00
|
|
|
> Open the most recent command for editing and then run it.
|
2021-07-09 16:45:55 +02:00
|
|
|
> More information: <https://manned.org/fc>.
|
2018-11-25 08:27:30 -07:00
|
|
|
|
2024-10-07 17:00:13 +03:00
|
|
|
- Open the last command in the default system editor and run it after editing:
|
2018-11-25 08:27:30 -07:00
|
|
|
|
|
|
|
`fc`
|
|
|
|
|
|
|
|
- Specify an editor to open with:
|
|
|
|
|
|
|
|
`fc -e {{'emacs'}}`
|
|
|
|
|
|
|
|
- List recent commands from history:
|
|
|
|
|
|
|
|
`fc -l`
|
2021-11-01 02:28:43 -03:00
|
|
|
|
|
|
|
- List recent commands in reverse order:
|
|
|
|
|
2023-01-25 11:29:14 +08:00
|
|
|
`fc -l -r`
|
2021-11-01 02:28:43 -03:00
|
|
|
|
2024-10-07 17:00:13 +03:00
|
|
|
- Edit and run a command from history:
|
|
|
|
|
|
|
|
`fc {{number}}`
|
|
|
|
|
|
|
|
- Edit commands in a given interval and run them:
|
2021-11-01 02:28:43 -03:00
|
|
|
|
|
|
|
`fc '{{416}}' '{{420}}'`
|
2024-10-07 17:00:13 +03:00
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
`fc --help`
|