Last active
September 30, 2015 08:35
-
-
Save raulanatol/759860637fd6144ee19e to your computer and use it in GitHub Desktop.
Create new terminal instance on the same path
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
#New terminal in the same position | |
function nt { | |
PWD_VALUE=$PWD | |
osascript -e " | |
tell application \"System Events\" to tell process \"Terminal\" to keystroke \"n\" using command down | |
tell application \"iTerm\" to tell session -1 of current terminal to write text \"cd $PWD_VALUE\" | |
" > /dev/null 2>&1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment