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
43c50f03
Commit
43c50f03
authored
Feb 27, 2013
by
Josh Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checking environment instead of local variable for fixing term in tmux plugin.
parent
7b156278
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
tmux.plugin.zsh
plugins/tmux/tmux.plugin.zsh
+8
-11
No files found.
plugins/tmux/tmux.plugin.zsh
View file @
43c50f03
...
@@ -23,16 +23,13 @@ fi
...
@@ -23,16 +23,13 @@ fi
local
fixed_config
=
""
local
fixed_config
=
""
# Set the correct local config file to use.
# Set the correct local config file to use.
if
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
if
[[
-f
$HOME
/.tmux.conf
||
-h
$HOME
/.tmux.conf
]]
then
then
if
[[
-f
$HOME
/.tmux.conf
||
-h
$HOME
/.tmux.conf
]]
#use this when they have a ~/.tmux.conf
then
fixed_config
=
"
$zsh_tmux_plugin_path
/tmux.extra.conf"
#use this when they have a ~/.tmux.conf
else
fixed_config
=
"
$zsh_tmux_plugin_path
/tmux.extra.conf"
#use this when they don't have a ~/.tmux.conf
else
fixed_config
=
"
$zsh_tmux_plugin_path
/tmux.only.conf"
#use this when they don't have a ~/.tmux.conf
fixed_config
=
"
$zsh_tmux_plugin_path
/tmux.only.conf"
fi
fi
fi
# Wrapper function for tmux.
# Wrapper function for tmux.
...
@@ -45,11 +42,11 @@ function zsh_tmux_plugin_run()
...
@@ -45,11 +42,11 @@ function zsh_tmux_plugin_run()
# Try to connect to an existing session.
# Try to connect to an existing session.
elif
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
elif
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
then
then
\t
mux attach
||
\t
mux
`
[[
-n
"
$fixed_config
"
]]
&&
echo
'-f '
$fixed_config
`
new-session
\t
mux attach
||
\t
mux
`
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$fixed_config
`
new-session
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
# Just run tmux, fixing the TERM variable if requested.
# Just run tmux, fixing the TERM variable if requested.
else
else
\t
mux
`
[[
-n
"
$fixed_config
"
]]
&&
echo
'-f '
$fixed_config
`
\t
mux
`
[[
"
$ZSH_TMUX_FIXTERM
"
==
"true"
]]
&&
echo
'-f '
$fixed_config
`
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
[[
"
$ZSH_TMUX_AUTOQUIT
"
==
"true"
]]
&&
exit
fi
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