mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-13 09:20:09 +00:00
Add iTerm2 v3 support
This commit is contained in:
parent
bd6dbd1d9b
commit
d189236f75
1 changed files with 36 additions and 0 deletions
|
@ -46,6 +46,16 @@ EOF
|
||||||
end tell
|
end tell
|
||||||
EOF
|
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
|
else
|
||||||
echo "tab: unsupported terminal app: $the_app"
|
echo "tab: unsupported terminal app: $the_app"
|
||||||
false
|
false
|
||||||
|
@ -73,6 +83,19 @@ function vsplit_tab() {
|
||||||
end tell
|
end tell
|
||||||
EOF
|
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
|
else
|
||||||
echo "$0: unsupported terminal app: $the_app" >&2
|
echo "$0: unsupported terminal app: $the_app" >&2
|
||||||
false
|
false
|
||||||
|
@ -100,6 +123,19 @@ function split_tab() {
|
||||||
end tell
|
end tell
|
||||||
EOF
|
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
|
else
|
||||||
echo "$0: unsupported terminal app: $the_app" >&2
|
echo "$0: unsupported terminal app: $the_app" >&2
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in a new issue