snippetbashTip
fc — Open the recent commands for editing and then run them. See also: `history`. More information: <http
Viewed 0 times
thecommandcommandsrecentcliopenforfc
Problem
How to use the
fc command: Open the recent commands for editing and then run them. See also: history. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-fc>.Solution
fc — Open the recent commands for editing and then run them. See also: history. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-fc>.Open the last command in the default system editor and run it after editing:
fcSpecify an editor to open with:
fc -e '{{emacs}}'List recent commands from history:
fc -lList recent commands in reverse order:
fc -l -rEdit and run a command from history:
fc {{number}}Edit commands in a given interval and run them:
fc '{{416}}' '{{420}}'Display help:
fc --helpCode Snippets
Open the last command in the default system editor and run it after editing
fcSpecify an editor to open with
fc -e '{{emacs}}'List recent commands from history
fc -lList recent commands in reverse order
fc -l -rEdit and run a command from history
fc {{number}}Context
tldr-pages: common/fc
Revisions (0)
No revisions yet.