File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ session_name_not_provided() {
11
11
[ -z " $SESSION_NAME " ]
12
12
}
13
13
14
+ create_named_session () {
15
+ if [ " $( get_tmux_option " @sessionist-maintain-path" ) " == " on" ]; then
16
+ TMUX=" " tmux -S " $( tmux_socket) " new-session -c " $1 " -s " $SESSION_NAME " -d -P -F " #{session_id}"
17
+ else
18
+ TMUX=" " tmux -S " $( tmux_socket) " new-session -s " $SESSION_NAME " -d -P -F " #{session_id}"
19
+ fi
20
+ }
21
+
14
22
create_new_tmux_session () {
15
23
if session_name_not_provided; then
16
24
exit 0
@@ -21,7 +29,7 @@ create_new_tmux_session() {
21
29
# New session name may differ from the input. Eg input name may be
22
30
# 'foo.bar', but new name will be 'foo_bar'.
23
31
local pane_current_path=$( tmux display-message -p " #{pane_current_path}" )
24
- local session_id=$( create_session " $pane_current_path " )
32
+ local session_id=$( create_named_session " $SESSION_NAME " )
25
33
switch_to_session " $session_id "
26
34
fi
27
35
}
You can’t perform that action at this time.
0 commit comments