Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tmux): don't autostart inside background intelliJ #11927

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

HeroCC
Copy link
Contributor

@HeroCC HeroCC commented Oct 2, 2023

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.
  • If the code introduces new aliases, I provide a valid use case for all plugin users down below.

Changes:

  • Check for presence of $INTELLIJ_ENVIRONMENT_READER and if it exists, skip tmux autolaunch

Other comments:

Jetbrains IDEs automatically launch an interactive terminal in the background to evaluate the system environment. However, using the tmux plugin with autostart breaks this behavior. This results in a degraded IDE experience (missing tools from $PATH for example), and a warning dialog.

This PR will use the suggested check provided by Jetbrains to disable the autostart feature in such an environment.

See more background on https://youtrack.jetbrains.com/articles/IDEA-A-19/Shell-Environment-Loading

HeroCC and others added 2 commits August 18, 2023 16:16
Jetbrains IDEs (like IntelliJ) run an environment reader on startup on
MacOS to populate its internal values.
To do this, it requires launching a terminal in interactive mode, but
can't handle actual interactivity (like tmux autolaunching).

We resolve this issue by skipping the autolaunch in such cases.
@ohmyzsh ohmyzsh bot added the Area: plugin Issue or PR related to a plugin label Oct 2, 2023
@carlosala carlosala changed the title feat(tmux): Don't autostart inside of background IntelliJ / Jetbrains IDEs fix(tmux): don't autostart inside background intelliJ Oct 2, 2023
@carlosala carlosala merged commit fea4584 into ohmyzsh:master Oct 2, 2023
@carlosala
Copy link
Member

Thanks for your contribution!

@HeroCC HeroCC deleted the intellij-no-tmux-autostart branch October 6, 2023 17:50
catbox143 pushed a commit to catbox143/ohmyzsh that referenced this pull request Oct 13, 2023
claudenm pushed a commit to claudenm/ohmyzsh that referenced this pull request Jan 9, 2024
fdelacruz pushed a commit to fdelacruz/ohmyzsh that referenced this pull request Jan 21, 2024
jmussmann pushed a commit to jmussmann/oh-my-zsh that referenced this pull request Feb 17, 2024
cschuyle pushed a commit to cschuyle/ohmyzsh that referenced this pull request Apr 18, 2024
naveen-u pushed a commit to naveen-u/ohmyzsh that referenced this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants