Skip to content

Instantly share code, notes, and snippets.

@Skinner927
Last active December 19, 2023 05:54
Show Gist options
  • Save Skinner927/dc006bfcc50e58b2227bb4d7d68753ca to your computer and use it in GitHub Desktop.
Save Skinner927/dc006bfcc50e58b2227bb4d7d68753ca to your computer and use it in GitHub Desktop.
pycharm linux launcher fix
#!/bin/bash
#Generated by JetBrains Toolbox 2.1.2.18853 at 2023-12-18T23:07:26.549763568
# Heavily modified by me to properly background the pycharm command
# https://gist.github.com/Skinner927/dc006bfcc50e58b2227bb4d7d68753ca
#
# Many issues are open but here's a recent one:
# https://youtrack.jetbrains.com/issue/IDEA-193204/IDEA-Pycharm-command-line-launchers-never-exit-on-Linux
PYCHARM_BIN="/home/user/.local/share/JetBrains/Toolbox/apps/pycharm-professional/bin/pycharm.sh"
PYCHARM_STDERR="${PYCHARM_STDERR:-/dev/null}"
RE_INTERACTIVE='((^|[[:space:]])--(help|version|wait)|^(diff|merge))($|[[:space:]])'
if [[ "$*" =~ $RE_INTERACTIVE ]]; then
"$PYCHARM_BIN" "$@"
else
"$PYCHARM_BIN" "$@" 1>/dev/null 2>"$PYCHARM_STDERR" &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment