07-31-2017, 09:31 PM
(07-31-2017, 05:20 PM)Simbax Wrote: Shell scripts still have a file extensionActually, they often come with no extension at all. You probably don't even realize how often programs you run on Linux are actually shell scripts. Just by randomly looking at some files in /usr/bin I found at least pip, lsb_release and ssh-copy-id.
(07-31-2017, 05:20 PM)Simbax Wrote: it's not like there are different highlighters for different shells, are there?Shebangs are not only for shells but also for all kinds of other interpreted languages like Python, Perl, PHP etc.
(07-31-2017, 05:20 PM)Simbax Wrote: The first line is for the shell to recognize which program to use when running them like ./script.txt, not for editors.I know for a fact thay both vim and IntelliJ IDEs set the syntax highlighting correctly based on a shebang, I never tried it on anything else. Jenkins' docs even recommend adding a shebang to Jenkinsfile just for the sake of syntax highlighting in editors.