[ENHANCEMENT] Expose an environment variable to let shells detect the embedded terminal
enhancementready for release
When this editor launches a terminal, there's currently no way for shell startup files (.zshrc, .bashrc, etc.) to know that they are running inside the editor rather than a dedicated terminal emulator.
This makes it hard to conditionally adjust startup behaviour. For example, in small embedded terminals users may want to **skip heavier tooling** (e.g. terminal multiplexers like zellij, banners, long-running startup scripts), while keeping them enabled in a normal terminal.
Other editors already solve this by setting environment variables. For example vscode sets:
```
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=<version>
```
This allows a simple gate in shell configs, e.g.
```bash
if [ "$TERM_PROGRAM" != "vscode" ]; then
# start zellij or other tooling
fi
```
2 条评论