Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
f4dc8c5b
Unverified
Commit
f4dc8c5b
authored
Dec 08, 2022
by
fedor
Committed by
GitHub
Dec 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tmux): use `$...SESSION_NAME` while attaching (#10946)
parent
b692ff2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
tmux.plugin.zsh
plugins/tmux/tmux.plugin.zsh
+7
-3
No files found.
plugins/tmux/tmux.plugin.zsh
View file @
f4dc8c5b
...
...
@@ -73,7 +73,11 @@ function _zsh_tmux_plugin_run() {
[[
"
$ZSH_TMUX_UNICODE
"
==
"true"
]]
&&
tmux_cmd+
=(
-u
)
# Try to connect to an existing session.
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
&&
$tmux_cmd
attach
if
[[
-n
"
$ZSH_TMUX_DEFAULT_SESSION_NAME
"
]]
;
then
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
&&
$tmux_cmd
attach
-t
$ZSH_TMUX_DEFAULT_SESSION_NAME
else
[[
"
$ZSH_TMUX_AUTOCONNECT
"
==
"true"
]]
&&
$tmux_cmd
attach
fi
# If failed, just run tmux, fixing the TERM variable if requested.
if
[[
$?
-ne
0
]]
;
then
...
...
@@ -83,9 +87,9 @@ function _zsh_tmux_plugin_run() {
tmux_cmd+
=(
-f
"
$ZSH_TMUX_CONFIG
"
)
fi
if
[[
-n
"
$ZSH_TMUX_DEFAULT_SESSION_NAME
"
]]
;
then
$tmux_cmd
new-session
-s
$ZSH_TMUX_DEFAULT_SESSION_NAME
$tmux_cmd
new-session
-s
$ZSH_TMUX_DEFAULT_SESSION_NAME
else
$tmux_cmd
new-session
$tmux_cmd
new-session
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