-
-
Save atian25/2ef612d3a812f1d3bf58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Library/Application\ Support/WebStorm9/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx | |
echo '#!/bin/sh | |
# | |
# Reveal a directory in the Terminal. | |
# | |
# The script takes one argument, the qualified name of a directory. | |
# | |
# Note that the script is necessary because osascript before osx 10.4 could not | |
# pass arguments. | |
# | |
/usr/bin/osascript <<EOF | |
tell application "iTerm" | |
activate | |
delay 1 | |
-- talk to the first terminal | |
tell the first terminal | |
try | |
-- launch a default shell in a new tab in the same terminal | |
launch session "Default Session" | |
on error | |
display dialog "There was an error creating a new tab in iTerm." buttons {"OK"} | |
end try | |
tell the last session | |
try | |
-- cd to the finder window | |
write text "cd $1" | |
on error | |
display dialog "There was an error cding to the finder window." buttons {"OK"} | |
end try | |
end tell | |
end tell | |
end tell | |
EOF' > terminal.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment