BashSupport icon indicating copy to clipboard operation
BashSupport copied to clipboard

Somewhat popular shebang `#!/usr/bin/env bash` should trigger bash support

Open tuttle opened this issue 7 years ago • 4 comments

Source files without extension started with #!/usr/bin/env bash are monochrome.

They should be colorful.

After changing the shebang to #!/bin/bash, the colors turn up right away.

Interesting is that after reverting the shebang to #!/usr/bin/env bash, the colors stay even after closing and reopening the file or after invalidating cache fro File menu or after the PyCharm restart.

Reported first for PyCharm 2018.1 (Professional Edition) Build #PY-181.4203.547, built on March 26, 2018 as https://youtrack.jetbrains.com/issue/PY-29304, but was redirected here. :-)

tuttle avatar Apr 03 '18 17:04 tuttle

This problem is severe as it renders the BashSupport plugin useless, since all my scripts use this shebang. It started happening when I upgraded IntelliJ Community Edition from 2017.3 to 2018.1.

jvaudry-ep avatar Apr 05 '18 00:04 jvaudry-ep

@tuttle @jvaudry-ep Thanks for the report. Afaik this is IntelliJ's fault, it's not updating the results of automatically detected file types. Could you please try to change an assignment (any) in the settings at "Editor > File Types". This should force IntelliJ to reapply the detection.

@jvaudry-ep Will you files update back to Bash coloring after you open and edit them? (Check that before the workaround above :)

jansorg avatar Apr 05 '18 09:04 jansorg

Thanks for the work-around. Editing the script will fix the issue for that individual file, and changing the "Editor > File Types" fixes all of them.

jvaudry-ep avatar Apr 05 '18 16:04 jvaudry-ep

Report at #579 if you still see this...

jansorg avatar Sep 04 '18 20:09 jansorg