Skip to content

Commit

Permalink
fix!(Session.new_window): Do not attach by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 14, 2024
1 parent 45b4a3d commit d643942
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/libtmux/session.py
Expand Up @@ -436,7 +436,7 @@ def new_window(
self,
window_name: t.Optional[str] = None,
start_directory: None = None,
attach: bool = True,
attach: bool = False,
window_index: str = "",
window_shell: t.Optional[str] = None,
environment: t.Optional[t.Dict[str, str]] = None,
Expand Down Expand Up @@ -465,6 +465,10 @@ def new_window(
useful for long-running processes where the closing of the
window upon completion is desired.
.. versionchanged:: 0.28.0
``attach`` default changed from ``True`` to ``False``.
Returns
-------
:class:`Window`
Expand Down
2 changes: 1 addition & 1 deletion src/libtmux/window.py
Expand Up @@ -39,7 +39,7 @@ class Window(Obj):
Examples
--------
>>> window = session.new_window('My project')
>>> window = session.new_window('My project', attach=True)
>>> window
Window(@2 2:My project, Session($... ...))
Expand Down

0 comments on commit d643942

Please sign in to comment.