Last active
October 10, 2017 09:58
-
-
Save Rpsl/b8337d0f0c18320da2e7 to your computer and use it in GitHub Desktop.
Open iTerm (2.9+) terminal from PhpStorm/WebStorm/Idea ( NativeNeighbourhood plugin ); Raw
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/WebIde100/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx | |
echo '#!/bin/sh | |
# | |
# !!!This is only for iTerm 2.9 and above!!! | |
# | |
# 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 | |
set close_first_tab to false | |
try | |
set myWindow to (select first window) | |
on error e number n | |
create window with default profile | |
set close_first_tab to true | |
end try | |
try | |
tell current window | |
-- These commands return a tab | |
set newTab to (create tab with default profile) | |
tell newTab | |
tell current session | |
write text "cd $1" | |
end tell | |
end tell | |
if close_first_tab then | |
tell first tab | |
delay 1 | |
close | |
end tell | |
end if | |
end tell | |
on error e number n | |
display dialog "my variable: " & e | |
end try | |
end tell | |
EOF' > terminal.sh |
This doesn't work for me either. Could you provide a detailed step by step guide?. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the next step after updating the terminal.sh file?