martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 259 forks source link

does the bash lexer not account for the shebang? #1053

Closed apprehensions closed 1 year ago

apprehensions commented 1 year ago

AFAIK, all scripts start with the following shebang: #!/bin/sh, #!/bin/bash, etc. but the lexer is not accounting for this, it only accounts for .sh files, and not all shell scripts are .sh.

ninewise commented 1 year ago

Strange, this does just work for me for this content in a file called test (I do have to reopen the file after writing)

#!/bin/sh
echo 1

From the top of my head, this works via the mime-type entry in filetype.lua.

apprehensions commented 1 year ago

i was running an old version of vis (0.8), i forgot to close. (fixed on 0.8-git)