Skip to content

Instantly share code, notes, and snippets.

@Rpsl
Last active May 25, 2021 19:28
Show Gist options
  • Save Rpsl/7870906 to your computer and use it in GitHub Desktop.
Save Rpsl/7870906 to your computer and use it in GitHub Desktop.
Open iTerm terminal from PhpStorm ( NativeNeighbourhood plugin );
cd ~/Library/Application\ Support/WebIde70/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
@lukrizal
Copy link

How about for Windows 10? If I want to instruct PHPStorm to use Git Bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment