diff --git a/CHANGES b/CHANGES index c8d72bbd9..14365d6e1 100644 --- a/CHANGES +++ b/CHANGES @@ -17,7 +17,7 @@ $ pip install --user --upgrade --pre libtmux ### Breaking changes -#### Command target change (#919) +#### Command target change (#535) Commands: All `cmd()` methods using custom or overridden targets must use the keyword argument `target`. This avoids entanglement with inner shell values that include `-t` for diff --git a/MIGRATION b/MIGRATION index 9d0b021ba..d7f8c1e87 100644 --- a/MIGRATION +++ b/MIGRATION @@ -25,6 +25,24 @@ _Detailed migration steps for the next version will be posted here._ +## 0.35.0: Commands require explicit targets (2024-03-17) + +### Commands require explicit targets (#535) + +- {meth}`Server.cmd()`, {meth}`Session.cmd()`, {meth}`Window.cmd()`, {meth}`Pane.cmd()` require passing `target` instead of `['-t', target]`, `['-tTargetName']`, etc. This change is to avoid issues mistakenly interpretting `-t` in other shell values as targets. + + Before: + + ```python + session.cmd('send-keys', 'echo hello', '-t', '0') + ``` + + With 0.35.0 and after: + + ```python + session.cmd('send-keys', 'echo hello', target='0') + ``` + ## 0.33.0: Deprecations for splitting (2024-03-03) ### Deprecations (#532)