We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b099e60 commit 88beef4Copy full SHA for 88beef4
libtmux/server.py
@@ -534,6 +534,20 @@ def new_session(
534
Raises
535
------
536
:exc:`exc.BadSessionName`
537
+
538
+ Examples
539
+ --------
540
+ Sessions can be created without a session name (0.14.2+):
541
+ >>> server.new_session()
542
+ Session($2 2)
543
544
+ Creating them in succession will enumerate IDs (via tmux):
545
546
+ Session($3 3)
547
548
+ With a `session_name`:
549
+ >>> server.new_session(session_name='my session')
550
+ Session($4 my session)
551
"""
552
if session_name is not None:
553
session_check_name(session_name)
0 commit comments