sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

Add exception for JetBrains terminal emulation #1958

Closed tblaschke closed 1 year ago

tblaschke commented 3 years ago

Proposed Changes

Do not autostart tmux if we start a terminal inside PyCharm or IntelliJ. Should also work for other JetBrains products.

catflyflyfly commented 2 years ago

tmux autostart will mess with JetBrains products (and other IDE as well) on 2 occasions

  1. When you start a new terminal from the terminal pane

  2. When you start-up the IDE from GUI, ex: Dock & Application for macOS.

    This will ping a notification

    IntelliJ IDEA has failed to load the environment from '/bin/zsh'. Integration with tools that rely on environment variables may work incorrectly. Learn More

Solutions:

  1. && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" will handle the terminal pane part.

  2. && -z "$INTELLIJ_ENVIRONMENT_READER" will handle the start-up from GUI part.

Note:

This issue occur to me on VSCode start-up as well. This should be an another issue, but TL;DR I solve that with && "$__CFBundleIdentifier" != "com.microsoft.VSCode".

indrajitr commented 1 year ago

Let's roll with this till we arrive at a more ideal solution.