Getting the active process name #304
-
Hi, I'm working on some part of the terminal feature of CodeEdit Project in this PR, and we are trying to make our terminal title updates automatically depending on what's shown in the terminal. What we want exactly is, when a program (e.g. htop, python3, node) is running, our title shows the program name (htop, Python, node, etc.), but when no program is running, the shell name (bash, zsh, etc.) should be displayed. I am aware of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to run a few pre command hooks to do this. Check the scripts that Apple runs at startup for their terminal (run the command “set” on the command line to quickly see it). |
Beta Was this translation helpful? Give feedback.
My bad, it seems Apple does not do this, but VSCode does:
https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh