Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

No highlight for non .sh files with shebang and underscore in filename #573

Open
csandanov opened this issue Aug 17, 2018 · 3 comments
Open

Comments

@csandanov
Copy link

PHPStorm 2018.2.1
BashSupport 1.6.13.182

How to reproduce:

  1. Create a new bash script (with shebang #!/usr/bin/env bash)
  2. Remove .sh from filename
  3. Rename the file so it has an underscore symbol in it
  4. Voila!, no highlight

It's a commong thing to have no extensions for bash script when they placed to bin/.

@jansorg
Copy link
Member

jansorg commented Aug 27, 2018

I'm unable to reproduce. Could you follow #579 to help to debug this?

@csandanov
Copy link
Author

Followed the steps and was able to partly reproduce the issue only if uninstalled previously installed version of the plugin and restart.

In details: after installing EAP and restarting PhpStorm, existing non-sh files with shebang and underscore in the name weren't highlighted, called the action to generate the report (result on the screenshot). Copied one of those files to a new file (also non-sh and named with underscore) and selected a Bourne Again Shell in appeared "Register New File Type Association" dialogue, suddenly all files (existing and the new) were highlighted. The same trick worked with the stable version. I wasn't able to reproduce this issue with the new file shell file and renaming existing.

I may be mistaken here but I think there was no "Register New File Type Association" dialogue on the copying before. I may have applied PhpStorm patch or something since the origial post

PhpStorm 2018.2.1
Build #PS-182.3911.43, built on August 8, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

screenshot 2018-08-29 10 54 59

@Paramood
Copy link

Paramood commented May 2, 2019

I have just seen a strange think.

  1. Installed the plugin.
  2. Restarted the IDE.
    gradlew file is not highlighted. It starts with #!/usr/bin/env sh so should be highlighted.
  3. Renamed gradlew to gradlew.sh.
    gradlew.sh is highlighted.
  4. Renamed gradlew.sh back to gradlew.
    gradlew is highlighted even after IDE restart.

IDE: IntelliJ IDEA 2019.1.1
BashSupport: v1.7.7
OS: Ubuntu 18.04

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants