#9 Mac OS X defaults are wrong

v1.4.1
closed
5
2013-04-01
2011-10-06
No

Bug report from http://marketplace.eclipse.org/content/easyshell


By Lance E Sloan
Good, but Mac OS X defaults are wrong

I like this extension a lot, but the defaults for Mac OS X are wrong. I've not worked out the proper commands for the two shell commands, but the others should be:

Explore command: open {1}
Copy Path string: {2}


Discussion

  • Andre Bossert

    Andre Bossert - 2012-11-09

    osx terminal command
    Submitted by Patrick Polloni on Fri, 01/06/2012 - 11:16
    I'm trying to find out the right command to open a terminal with osx.
    The link for the bug request is not working. Sourceforge report an error trying to open the page.
    The correct command to open a terminal form a terminal in Osx and make it change the directory is:
    osascript -e 'tell application "Terminal" to do script with command "cd {path}"' where {path} should be substituted with the right path from one of those provided with EasyShell ({1}, {2},...).
    At the moment this is not working. I hope someone else could give tips to make it working.

     
  • Andre Bossert

    Andre Bossert - 2012-11-09
    • labels: GUI --> GUI, Mac OS X
     
  • Andre Bossert

    Andre Bossert - 2012-11-15
    • milestone: v1.3.5 --> v1.4.0
     
  • Andre Bossert

    Andre Bossert - 2013-01-06
    • milestone: v1.4.0 --> v1.4.1
     
  • Andre Bossert

    Andre Bossert - 2013-01-06

    moved to 1.4.1

     
  • Andre Bossert

    Andre Bossert - 2013-01-06

    Still not clear how to define right Mac OS X presets. I've no Mac, so no idea what is the right solution. Help needed from Mac OS X users.

     
  • Mark Phippard

    Mark Phippard - 2013-02-20

    These are the settings that work for me:

    Open: open -a Terminal {1}
    Run: open -a Terminal {2}
    Explore: open {1}

    A couple of things here:

    For Explore option, if you use {2} and the item is a file, then it opens the associated application and not the Finder. So I think {1} is the right value to use.

    For any of the commands, using any kind of quotes in the command causes it to not work. I tried both single and double quotes around the variable and I also tried the options in your dropdown box. The consequence of this is of course that it does not work if there are spaces in the path name.

    In theory, single quotes around the path name is the right option. When using Terminal, this works:

    $ open 'path with spaces'

     
  • Mark Phippard

    Mark Phippard - 2013-02-20

    FWIW, this works from Java on OSX:

    String[] command = new String[] { "open", "/Users/me/work/path with spaces" };
    Runtime.getRuntime().exec(command);

    where this does not work:

    String command = new String("open /Users/me/work/path with spaces");
    Runtime.getRuntime().exec(command);

    I tried it based on this:

    http://stackoverflow.com/questions/697621/spaces-in-java-execute-path-for-os-x

     
  • Mark Phippard

    Mark Phippard - 2013-02-20

    The attached patch works for me using the defaults I posted earlier. This basically converts the command into an array of String separated by spaces. It then applies the variable substitution to each of those items, and finally runs the command by passing the array instead of the single String.

    I only tested on OSX, but I believe this should work on all OS.

     
  • Mark Phippard

    Mark Phippard - 2013-02-20

    OK, last update. This command might be a better one to use for Explore:

    open -R {2}

    The -R option means "Reveal in Finder" and so this allows you to pass the path of the selection {2} rather than its parent {1}. I confirmed it works.

     
  • Mark Phippard

    Mark Phippard - 2013-02-20

    Updated patch to also include changing the default OSX preferences as recommended.

     
  • Andre Bossert

    Andre Bossert - 2013-03-18

    Thank You for investigation and patch. I will add it for 1.4.1

     
  • Andre Bossert

    Andre Bossert - 2013-03-18

    It would be helpful if you can test it for me before release. If you want please send me an e-mail, i will provide beta version for you.

     
  • Mark Phippard

    Mark Phippard - 2013-03-18

    If you want someone to test on OSX, I can do so for you.

     
  • Stefan

    Stefan - 2013-03-24

    I have tested the seetings:

    This works for me:
    Shell Open command: open -a Terminal {1}
    Shell Run command: open -a Terminal {2}
    Explore command: open {2}
    Copy Path strings: {2}
    Add Quotes to 1, 2, 3: No

     
  • Andre Bossert

    Andre Bossert - 2013-04-01
    • status: open --> closed
     
  • Andre Bossert

    Andre Bossert - 2013-04-01

    Thank You!

    Just released v1.4.1

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks