Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
d189236f
Commit
d189236f
authored
9 years ago
by
Johan K. Jensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add iTerm2 v3 support
parent
bd6dbd1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
osx.plugin.zsh
plugins/osx/osx.plugin.zsh
+36
-0
No files found.
plugins/osx/osx.plugin.zsh
View file @
d189236f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
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