Commit 18f1693
committed
hooks(feat): add warning for set_hooks on tmux < 3.0
why: Hook arrays are a tmux 3.0+ feature. On tmux < 3.0, hooks are
stored by exact name in a red-black tree, so "session-renamed[0]"
is a literal hook name, not an array index. This causes unexpected
behavior with set_hooks and clear_existing.
what:
- Add UserWarning when set_hooks is called on tmux < 3.0
- Warning explains the limitation and references tmux commit dfb7bb68
Ref: tmux commit dfb7bb68 (April 2019) merged hooks into options
as array options for tmux 3.0.1 parent 4d2d9b5 commit 18f1693
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
486 | 498 | | |
487 | 499 | | |
488 | 500 | | |
| |||
0 commit comments