File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -1488,10 +1488,18 @@ def _default_allow_remote(self) -> bool:
1488
1488
"""
1489
1489
),
1490
1490
)
1491
+
1491
1492
terminado_settings = Dict (
1492
- Union ([List (), Unicode ()]),
1493
+ per_key_traits = {
1494
+ "shell_command" : Union (
1495
+ [List (), Unicode ()], help = "The shell command to execute in the terminal."
1496
+ ),
1497
+ "extra_env" : Dict (
1498
+ Unicode (), help = "Extra environment variables to set in the terminal."
1499
+ ),
1500
+ },
1493
1501
config = True ,
1494
- help = _i18n (' Supply overrides for terminado. Currently only supports "shell_command".' ),
1502
+ help = _i18n (" Supply overrides for terminado." ),
1495
1503
)
1496
1504
1497
1505
cookie_options = Dict (
Original file line number Diff line number Diff line change @@ -297,6 +297,17 @@ def test_shell_command_override(
297
297
assert app .web_app .settings ["terminal_manager" ].shell_command == expected_shell
298
298
299
299
300
+ def test_terminal_extra_env_override (jp_configurable_serverapp ):
301
+ config = Config ({"ServerApp" : {"terminado_settings" : {"extra_env" : {"PS1" : "jupyter> " }}}})
302
+
303
+ app = jp_configurable_serverapp (config = config )
304
+ terminado_settings = getattr (app , "terminado_settings" , {})
305
+
306
+ assert "extra_env" in terminado_settings
307
+ assert "PS1" in terminado_settings ["extra_env" ]
308
+ assert terminado_settings ["extra_env" ]["PS1" ] == "jupyter> "
309
+
310
+
300
311
def test_importing_shims ():
301
312
with warnings .catch_warnings ():
302
313
warnings .simplefilter ("ignore" )
You can’t perform that action at this time.
0 commit comments