Forrest logo
back to the fc tool

fc:tldr:d76e0

fc: Specify an editor to open with.
$ fc -e ${'emacs'}
try on your machine

This command uses the fc command in Unix-like operating systems to open a text editor, specifically Emacs, for editing command history. Here is a breakdown of the command:

  • fc is a command-line utility used for editing and re-executing previous commands in the shell history.
  • -e is an option for fc (short for "editor") that allows specifying the text editor to use for editing the command history.
  • ${'emacs'} is a way to specify the value for the -e option. It uses shell parameter expansion to substitute the value within the curly braces. In this case, it sets the text editor as Emacs.

Therefore, when executing the command, it will open Emacs as the editor to view and modify the shell history.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fc tool