External Tool: Double quotes in Parameters Follow
Hi,
I try to set up an external tool where I need to use double quotes. (The executable I’d like to call is “osascript” on Mac OS X, wich executes AppleScript code. As AppleScript uses double quotes for some things, I can’t use single quote instead.)
However, when I enter any double quotes in the “Edit Tool” dialog’s “Parameters” field, they are removed when the tool is executed. (Which may not be a big surprise, given that the documentation says that double quotes should be used for arguments that contain spaces.) The funny thing is that when I try to escape a double quote character quotes using a backslash, both the backslash AND the double quote are in the ouput.
Examples:
Program: /usr/bin/osascript
Parameters: -e 'tell application "Finder" to activate'
Executes: /usr/bin/osascript -e 'tell application Finder to activate'
Program: /usr/bin/osascript
Parameters: -e 'tell application \"Finder\" to activate'
Executes: /usr/bin/osascript -e 'tell application \"Finder\" to activate'
Program: /usr/bin/osascript
Parameters: "-e 'tell application \"Finder\" to activate'"
Executes: /usr/bin/osascript -e 'tell application \"Finder\" to activate'
What I’d need is simply:
/usr/bin/osascript -e 'tell application "Finder" to activate'
Do I really have to write a wrapper shell script to work around this?
Carsten
Please sign in to leave a comment.
Hello C B,
Please submit an issue - http://youtrack.jetbrains.net/issues/WI#newissue=yes
Thank you for feedback!
http://youtrack.jetbrains.net/issue/WI-8228
Hi, please try using backslash '\' to escape the quotes:
\"word\"
supposed to work