Shebang inspection for file type determination

It would be great if pycharm could look at shebang notation to determine file type.

Example:
code/a/plug has #!/usr/bin/env python

code/b/plug has #!/bin/bash

It would be great if the files (without any distinguishable file name) could be associated with different syntax based on shebang (which is a posix standard).

Alternatively allow me to put a slash in the file type association to explicitly list my files for different plugins (so I can say a/plug is python, b/plug is bash).
2 comments
Comment actions Permalink

On some projects its customary to have all scripts end in .sh including php or python. Other projects .sh files contain bash or Bourne code.
A lot of big projects don't use an extension at all for their executables. PHPStorm etc. does not handle this well.
When switching between projects I find that I continuously adjust the associations.

0
Comment actions Permalink

Please submit a feature request to our issue tracker:

https://youtrack.jetbrains.com/issues/PY

Refer to the following article if you're not familiar with YouTrack:
https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications

0

Please sign in to leave a comment.