diff options
author | Marc Cornellà <marc.cornella@live.com> | 2016-05-01 16:23:25 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2016-05-01 16:23:25 +0200 |
commit | 0ebe35968cee69431790c78d427813d073db71c1 (patch) | |
tree | 3e93b613c5b2acb824ebff38d6722cdcb33fcfb0 /plugins | |
parent | 1b1315a777328095cd8b5f364fd4345eeae7c4bf (diff) | |
parent | d189236f757b59262bd8c98abd0c48cd04bc9ec2 (diff) | |
download | zsh-0ebe35968cee69431790c78d427813d073db71c1.tar.gz zsh-0ebe35968cee69431790c78d427813d073db71c1.tar.bz2 zsh-0ebe35968cee69431790c78d427813d073db71c1.zip |
Merge pull request #4907 from johankj/feature/osx-iterm2
Add iTerm2 v3 support
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/osx/osx.plugin.zsh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a1516dcce..c92b6556d 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -46,6 +46,16 @@ EOF end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current window + create tab with default profile + tell current session to write text "${command}" + end tell + end tell +EOF + else echo "tab: unsupported terminal app: $the_app" false @@ -73,6 +83,19 @@ function vsplit_tab() { end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current session of first window + set newSession to (split vertically with same profile) + tell newSession + write text "${command}" + select + end tell + end tell + end tell +EOF + else echo "$0: unsupported terminal app: $the_app" >&2 false @@ -100,6 +123,19 @@ function split_tab() { end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current session of first window + set newSession to (split horizontally with same profile) + tell newSession + write text "${command}" + select + end tell + end tell + end tell +EOF + else echo "$0: unsupported terminal app: $the_app" >&2 false |