This quick-look extension (SourceCodeSyntaxHighlight) does not detect the syntax/language of files which use shebangs and not file extensions.
For source code of interpreted languages, it is standard practice to create executable files containing a so-called "shebang" comment line which dictates which executable should be used to interpret the code.
(I think the way it works is that files beginning with a shebang line are opened with the system's default shell, and the shell then runs the executable specified in the shebang, with the source code filepath as the first argument. Something like this.)
This quick-look extension should appropriately highlight the syntax of such files. It is standard practice to write executable files this way; the file extension is there for convenience, not because it is strictly necessary. Such files are added to the $PATH of the system's shell, and therefore become executables which can be called by name. And usually we do not want unnecessary file extensions inside an executable name. The shebang line tells the shell which program to use to interpret the source code.
Here is an example of a source file which is not syntax-highlighted by this quick-look extension:
Here is what it should look like instead (I triggered the syntax highlighting by renaming the file from "newpy" to "newpy.sh"):
I am aware of two variants of shebangs:
#!/path/to/executable
#!/usr/bin/env executable
Though there are other ways to use shebangs, these are by far the most common, I believe, and both should be handled by this quick-look extension.
This quick-look extension (SourceCodeSyntaxHighlight) does not detect the syntax/language of files which use shebangs and not file extensions.
For source code of interpreted languages, it is standard practice to create executable files containing a so-called "shebang" comment line which dictates which executable should be used to interpret the code.
(I think the way it works is that files beginning with a shebang line are opened with the system's default shell, and the shell then runs the executable specified in the shebang, with the source code filepath as the first argument. Something like this.)
This quick-look extension should appropriately highlight the syntax of such files. It is standard practice to write executable files this way; the file extension is there for convenience, not because it is strictly necessary. Such files are added to the
$PATH
of the system's shell, and therefore become executables which can be called by name. And usually we do not want unnecessary file extensions inside an executable name. The shebang line tells the shell which program to use to interpret the source code.Here is an example of a source file which is not syntax-highlighted by this quick-look extension:
Here is what it should look like instead (I triggered the syntax highlighting by renaming the file from "newpy" to "newpy.sh"):
I am aware of two variants of shebangs:
#!/path/to/executable
#!/usr/bin/env executable
Though there are other ways to use shebangs, these are by far the most common, I believe, and both should be handled by this quick-look extension.