Catching "File Saved" or CMD-W Signal?

L

Lance Pollard

Hey,

How does git/svn know to to finish committing your changes after you
close the commit message (assuming you open it in TextMate or
something)?

I would like to create something similar, where you run a command, it
opens a file for you to fill in the blanks, and when you save and close
it, the process finishes, how would I do that?

Thanks so much,
Lance
 
S

Space Ship Traveller

It spawns the child process (editor) and when it quits it checks the
status code of the process. If it was successful it continues with the
commit.
 
L

Lance Pollard

It spawns the child process (editor) and when it quits it checks the
status code of the process. If it was successful it continues with the
commit.

Thanks, that's how it works!

Anyone have a quick snippet to make that happen? How does it know when
it quits, and how does it continue the process, that seems like I'd need
to look through a lot of blogs :p

Thanks,
Lance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top