For example, if you have ever used git, when you do a commit it will open vi to add or edit some text, and when you exit it is able to intercept this and use that text. What is this called so I can lookup some docs on it? Any other information, especially performing this using python, would be very helpful.
Share
Often, the user’s
$EDITORenvironment variable is executed, and instructed to write a temporary file with some random name. The temporary file can then be read back in by your application and discarded when no longer needed.This allows the text editor to be a user preference.
$EDITORcould be/usr/bin/vi,/usr/bin/emacs, whatever.