Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Detect language for syntax highlighting based on shebang in Fisheye

We have executable Python scripts in our repository that do not include a *.py file extension in their name. Therefore, the syntax highlighter of Crucible/Fisheye is not able to detect the language. But we have a shebang included in the Python script. So, there is some information about the programming language in the file which could be used by the syntax highlighter for language detection.

I found something for Stash: 

Is there something similar for Fisheye/Crucible syntax highlighting?


To be clear: I am NOT interested in defining syntax highlighting. I want to detect the language of a file (using the shebang in the header of the script) to determine which existing syntax highlighting to use. The Python script does not have a *.py file extension that could be used for detecting the language but a shebang in first line of the executable Python script like that:

# any python code follows

2 answers

Thanks for the suggestion. But I am looking for something to derive the language of a file from the shebang in its header and not from its file extension. I couldn't find a description of this feature in your wiki articles.

0 votes

Hi Mattias, file extension mappings for syntax highlighter are defined in <fisheye dir>/syntax/

Hi Marek,

we had the synatx/ entry for the files with extenstion .py and it is working for files having correct extension.

"**/*.py" python.def "Python"

is there any option for files not having extenstion to be identified like  MIME type ?

we had tried  the below in raw-mime.types

application/python py
application/x-python py
text/x-python python py
text/python py

and also 

text/plain asc ascx asmx asa asax ashx axd config txt java jsp asp aspx cs idl cpp cxx c h pl pod py sh awk sed sql jspf tag xaml frm vb browser master
csproj vbproj sitemap


but syntax highlighting not working for files without .py extenstion .

any options to enable syntax highlighting for files which do not have extension in fisheye?


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

495 views 10 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you