Skip to content

Commit 31d388c

Browse files
authored
fix: use strict matching when switching sessions (#67)
1 parent 3357626 commit 31d388c

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ follows <https://www.conventionalcommits.org/en/v1.0.0/> to track changes.
3737

3838
## [Unreleased]
3939

40+
### Fixed
41+
42+
- Use strict matching for session names when switching popup sessions ([#67])
43+
44+
[#67]: https://github.com/loichyan/tmux-toggle-popup/pull/67
45+
4046
## [0.5.0] - 2026-01-31
4147

4248
This release includes some fundamental changes to how popup sessions and hooks

src/toggle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ prepare_init() {
6666
if ! tmux has-session -t "=$popup_id" 2>/dev/null; then
6767
init_cmds+=(new-session -ds "$popup_id" "${session_args[@]}" \;)
6868
fi
69-
init_cmds+=(switch-client -t "$popup_id" \;)
69+
init_cmds+=(switch-client -t "=$popup_id" \;)
7070
fi
7171

7272
init_cmds+=(

src/toggle_tests/switch_new_popup.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TMUX:BEGIN[2] {
2020
;
2121
switch-client
2222
-t
23-
default_id_format/p_switch_2
23+
=default_id_format/p_switch_2
2424
;
2525
setenv
2626
__tmux_popup_caller

src/toggle_tests/switch_popup.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TMUX:BEGIN[2] {
1414
}
1515
switch-client
1616
-t
17-
default_id_format/p_switch_2
17+
=default_id_format/p_switch_2
1818
;
1919
setenv
2020
__tmux_popup_caller

0 commit comments

Comments
 (0)