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
1e625b42
Commit
1e625b42
authored
Jun 25, 2013
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1903 from andschwa/tmux_iterm2
Tmux iTerm2 integration
parents
354211f5
55f79906
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tmux.plugin.zsh
plugins/tmux/tmux.plugin.zsh
+5
-3
No files found.
plugins/tmux/tmux.plugin.zsh
View file @
1e625b42
...
...
@@ -14,6 +14,8 @@ if which tmux &> /dev/null
[[
-n
"
$ZSH_TMUX_AUTOQUIT
"
]]
||
ZSH_TMUX_AUTOQUIT
=
$ZSH_TMUX_AUTOSTART
# Set term to screen or screen-256color based on current terminal support
[[
-n
"
$ZSH_TMUX_FIXTERM
"
]]
||
ZSH_TMUX_FIXTERM
=
true
# Set '-CC' option for iTerm2 tmux integration
[[
-n
"
$$
ZSH_TMUX_ITERM2"
]]
||
ZSH_TMUX_ITERM2
=
false
# The TERM to use for non-256 color terminals.
# Tmux states this should be screen, but you may need to change it on
# systems without the proper terminfo
...
...
@@ -36,7 +38,7 @@ if which tmux &> /dev/null
fi
# Set the correct local config file to use.
if
[[
-f
$HOME
/.tmux.conf
||
-h
$HOME
/.tmux.conf
]]
if
[[
"
$ZSH_TMUX_ITERM2
"
==
"false"
]]
&&
((
[[
-f
$HOME
/.tmux.conf
]]
||
-h
$HOME
/.tmux.conf
]]
))
then
#use this when they have a ~/.tmux.conf
export
_ZSH_TMUX_FIXED_CONFIG
=
"
$zsh_tmux_plugin_path
/tmux.extra.conf"
...
...
@@ -55,11 +57,11 @@ if which tmux &> /dev/null
# Try to connect to an existing session.
elif
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
then
\t
mux
attach
||
\t
mux
`
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$_ZSH_TMUX_FIXED_CONFIG
`
new-session
\t
mux
`
[[
"
$ZSH_TMUX_ITERM2
"
==
"true"
]]
&&
echo
'-CC '
`
attach
||
\t
mux
`
[[
"
$ZSH_TMUX_ITERM2
"
==
"true"
]]
&&
echo
'-CC '
`
`
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$_ZSH_TMUX_FIXED_CONFIG
`
new-session
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
# Just run tmux, fixing the TERM variable if requested.
else
\t
mux
`
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$_ZSH_TMUX_FIXED_CONFIG
`
\t
mux
`
[[
"
$ZSH_TMUX_
ITERM2
"
==
"true"
]]
&&
echo
'-CC '
`
`
[[
"
$ZSH_TMUX_
FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$_ZSH_TMUX_FIXED_CONFIG
`
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
fi
}
...
...
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