Catching "File Saved" or CMD-W Signal?

Discussion in 'Ruby' started by Lance Pollard, Sep 19, 2009.

  1. 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
    --
    Posted via http://www.ruby-forum.com/.
     
    Lance Pollard, Sep 19, 2009
    #1
    1. Advertising

  2. 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.

    On 19/09/2009, at 3:04 PM, Lance Pollard wrote:

    > 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
    > --
    > Posted via http://www.ruby-forum.com/.
    >
     
    Space Ship Traveller, Sep 19, 2009
    #2
    1. Advertising

  3. > 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
    --
    Posted via http://www.ruby-forum.com/.
     
    Lance Pollard, Sep 19, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Achim Domma (Procoders)

    read input for cmd.Cmd from file

    Achim Domma (Procoders), Jun 3, 2005, in forum: Python
    Replies:
    2
    Views:
    8,101
    Peter Otten
    Jun 3, 2005
  2. Sarir Khamsi

    Interpreter-like help in cmd.Cmd

    Sarir Khamsi, Jun 9, 2005, in forum: Python
    Replies:
    4
    Views:
    389
    Bengt Richter
    Jun 26, 2005
  3. =?ISO-8859-1?Q?Sch=FCle_Daniel?=

    [exec cmd for cmd in cmds]

    =?ISO-8859-1?Q?Sch=FCle_Daniel?=, Mar 8, 2006, in forum: Python
    Replies:
    3
    Views:
    400
    Scott David Daniels
    Mar 8, 2006
  4. Diez B. Roggisch

    pydb remote debugging/cmd.Cmd over socket?

    Diez B. Roggisch, May 28, 2008, in forum: Python
    Replies:
    2
    Views:
    559
    Diez B. Roggisch
    May 29, 2008
  5. Diez B. Roggisch

    cmd.Cmd bug or at least docu-bug

    Diez B. Roggisch, May 29, 2008, in forum: Python
    Replies:
    1
    Views:
    347
    Michele Simionato
    May 29, 2008
Loading...

Share This Page