2

Sometimes the commands I run produce output which requires me to use some information from the output. As follows:

Exporting branch {BRANCH}.  You may now checkout another branch.
Another process is accessing the directory {LONG_DIRECTORY_PATH}
If the process has died, remove lockfile:

  rm {LONG_DIRECTORY_PATH}

In this case, I have to manually enter (or copy) rm {LONG_DIRECTORY_PATH}. This is a big problem when I have to use part of the output as a part of the next command.

Ideally, I would probably like to open previous command output in a text editor (similar to the way Ctrlxe or fc does). How would I go about this?

I would also prefer not to have to change the original command - since I might not know in advance after which command will I have to manipulate the output.

EDIT: Knowing that it's not a built-in feature, is there some sort of a wrapper or external program that allows for such a functionality?

Ruslan Osipov
  • 5,655
  • 4
  • 29
  • 44

0 Answers0