Open
Description
Problem
We need a way to set the terminal prompt (e.g. with PS1
environment variable) for reproducible snapshots as in jupyterlab/jupyterlab#17656. This may be also desirable for real deployments. While terminado classes accept both shell_command
and extra_env
, the latter is not currently supported in jupyter-server traitlet definition:
jupyter_server/jupyter_server/serverapp.py
Lines 1491 to 1495 in 04dd3e7
Proposed Solution
Use per-key traitlets to accept shell_command
as an union of string/list and extra_env
as a dict with string keys.
Additional context
Need to add a test around here:
jupyter_server/tests/test_terminal.py
Lines 278 to 297 in 04dd3e7