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() {
1111 [ -z " $SESSION_NAME " ]
1212}
1313
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+
1422create_new_tmux_session () {
1523 if session_name_not_provided; then
1624 exit 0
@@ -21,7 +29,7 @@ create_new_tmux_session() {
2129 # New session name may differ from the input. Eg input name may be
2230 # 'foo.bar', but new name will be 'foo_bar'.
2331 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 " )
2533 switch_to_session " $session_id "
2634 fi
2735}
You can’t perform that action at this time.
0 commit comments