Command line mode?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svec
    Enthusiast
    • Jun 2011
    • 38

    Command line mode?

    I love BC on the command line. This command seems to work, but the error messages scare me a bit:

    $ /Applications/Beyond\ Compare.app/Contents/MacOS/BCompare a a
    TCarbonButton.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonCheckBox.SetFocus Error: SetKeyboardFocus failed with result -30585
    TCarbonButton.SetFocus Error: SetKeyboardFocus failed with result -30585

    Is there a better way to run BC from the command line?

    Thanks!
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    We have a launcher utility to handle this. Technically there's a "Install CLI Tools" command in the "Beyond Compare" menu, but a bug slipped through testing and it doesn't work.

    From the command line run this command:

    sudo ln -s /Applications/Beyond\ Compare.app/Contents/MacOS/bcomp /usr/local/bin/bcompare

    You should be able to use all of BC's normal command line arguments then. Like the known issues list mentions though, scripting is still a bit flaky if it isn't the only thing running.
    Zoë P Scooter Software

    Comment

    • svec
      Enthusiast
      • Jun 2011
      • 38

      #3
      FYI, my mac doesn't have /usr/local/bin. Not a big deal, I'll put it elsewhere, but hopefully your "Install CLI Tools" is aware that the dir might not exist.

      Thanks!

      Comment

      • svec
        Enthusiast
        • Jun 2011
        • 38

        #4
        I ran this:

        /Applications/Beyond\ Compare.app/Contents/MacOS/bcomp a a

        and it failed silently. The BC icon popped up for a second or two, then disappeared. No output on the terminal.

        Comment

        • Zoë
          Team Scooter
          • Oct 2007
          • 2666

          #5
          I noticed that today too. It's been a while since it was written, so I don't know why off the top of my head, but it should work if you create the symbolic link to it.
          Zoë P Scooter Software

          Comment

          • svec
            Enthusiast
            • Jun 2011
            • 38

            #6
            Yup, creating a symbolic link to bcomp and then running it that way fixed it, thanks!

            Comment

            • dreadjr
              Journeyman
              • Feb 2013
              • 16

              #7
              cli help

              I installed using the command above.

              Is there a help command i can use from the command line, tried
              bcompare --help
              bcompare /help
              bcompare /?
              man bcompare

              just opens the app.

              I tried passing two files as well, didn't open them as expected. Appears the app has to be shut first, then it works as expected.
              Last edited by dreadjr; 18-Feb-2013, 10:04 AM.

              Comment

              • David
                Team Scooter
                • Oct 2009
                • 124

                #8
                'bcompare -h' should bring up the usage message.

                'bcompare file1 file2' should open up the two files for comparison. If the app is already open, with an existing window, the comparison will be opened up on that window, and the window should be brought to the front.

                If this is not happening, please create us a list of repeatable steps to recreate the problem.

                David
                David J Scooter Software

                Comment

                • svec
                  Enthusiast
                  • Jun 2011
                  • 38

                  #9
                  "bcomp -h" works for me (prints help info).

                  Comment

                  Working...