File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ def new_session(self,
397
397
attach = False ,
398
398
start_directory = None ,
399
399
window_name = None ,
400
- shell = None ,
400
+ window_command = None ,
401
401
* args ,
402
402
** kwargs ):
403
403
"""Return :class:`Session` from ``$ tmux new-session``.
@@ -435,7 +435,7 @@ def new_session(self,
435
435
$ tmux new-session -n <window_name>
436
436
437
437
:type session_name: str
438
- :param shell : execute a command on starting the session. The
438
+ :param window_command : execute a command on starting the session. The
439
439
window will close when the command exits.
440
440
NOTE: When this command exits the window will close. This feature
441
441
is useful for long-running processes where the closing of the
@@ -486,8 +486,8 @@ def new_session(self,
486
486
if has_gte_version ('2.6' ) and 'TMUX' not in os .environ :
487
487
tmux_args += ('-x' , 800 , '-y' , 600 )
488
488
489
- if shell :
490
- tmux_args += (shell , )
489
+ if window_command :
490
+ tmux_args += (window_command , )
491
491
492
492
proc = self .cmd (
493
493
'new-session' ,
Original file line number Diff line number Diff line change @@ -89,9 +89,10 @@ def test_new_session(server):
89
89
90
90
91
91
def test_new_session_shell (server ):
92
- """Server.new_session creates and returns valid session running with specified command"""
92
+ """Server.new_session creates and returns valid session running with
93
+ specified command"""
93
94
cmd = 'sleep 1m'
94
- mysession = server .new_session ("test_new_session" , shell = cmd )
95
+ mysession = server .new_session ("test_new_session" , window_command = cmd )
95
96
window = mysession .list_windows ()[0 ]
96
97
pane = window .list_panes ()[0 ]
97
98
assert mysession .get ("session_name" ) == "test_new_session"
You can’t perform that action at this time.
0 commit comments