Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
d189236f
Commit
d189236f
authored
Mar 08, 2016
by
Johan K. Jensen
Browse files
Add iTerm2 v3 support
parent
bd6dbd1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/osx/osx.plugin.zsh
View file @
d189236f
...
@@ -46,6 +46,16 @@ EOF
...
@@ -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() {
...
@@ -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() {
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment