Forrest logo
back to the mg tool

mg:tldr:8fe82

mg: Open a file at a specified line number.
$ mg +${line_number} ${filename}
try on your machine

The command "mg +${line_number} ${filename}" opens a file named ${filename} in the "mg" (MicroGnuEmacs) text editor and positions the cursor at the line specified by ${line_number}.

Here's a breakdown of the command:

  • mg: It is the command to launch the "mg" text editor.
  • +${line_number}: The + symbol followed by ${line_number} indicates that the cursor should be positioned at the line number specified by the value of ${line_number}.
  • ${filename}: It represents the name of the file that you want to open in the editor.

By executing this command, you will open the specified file in the "mg" editor and directly navigate to the line specified by ${line_number}.

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 mg tool