(related: Identify gnome-terminal window by tab title)
When I open several tabs in GNOME Terminal (Version 3.44.0 for GNOME 42) on my Ubuntu 22.04, all tabs have the uninformative title "Terminal". I want them to be automatically titled:
- the current working directory if it's in shell prompt (e.g.
/home/user123/Downloads) - the name of the open process (e.g.
vim ~/.bashrc) in case there is an open process.
How can I achieve that? I use bash, but I can switch to zsh if necessary.
