I am using Warp (a terminal emulator for mac) for couple of months now in combination with VSCode without any issues. Warp has this feature that "wraps" shells that it runs to make it more comfortable with some GUI features, but to make it work with subshells (i.e when you open a new zsh inside another one) you have to add these lines to .zshrc:
# Warp: this is used to warpify subshells.
# Learn more: https://docs.warp.dev/features/subshells.
printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "zsh" }}\x9c'
VSCode opens it's integrated terminal with zsh without any issue. But WebStorm just does not work, it just stucks at empty terminal window and stays like that forever:

But if I remove the above Warp lines from .zshrc WebStorm's terminal starts working, but now Warp is not able to wrap the subshells.
Is this a known issue? I've tried googling but couldn't find anything relevant. I assume that the output from that printf ... somehow breaks the WebStorm, although VSCode works just fine. Is there a way to make WebStorm to sort of "ignore" what printf is writing to output?
I found a somewhat hacky solution: it turns out that WebStorm stores an environment variable
TERMINAL_EMULATOR=JetBrains-JediTermfor it's integrated shells. So just add anifcondition before theprintfto check if it's running inside the WebStorms terminal or not:It works, but would be better if there is some configuration for WebStorm to just work with these kind of outputs.