Skip to content

Commit

Permalink
ftdetect: relax matching of slashes in shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed May 29, 2024
1 parent c78416a commit b46dabb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion ftdetect/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2024 Mar 03
au BufNewFile,BufRead \c{,*.}justfile,\c*.just setfiletype just
au BufNewFile,BufRead * if getline(1) =~# '\v^#!//@!%(\w|-|//@!)*/%(env%(\s+-S)?\s+)?just\A' | setfiletype just | endif
au BufNewFile,BufRead * if getline(1) =~# '\v^#!/%(\w|[-/])*/%(env%(\s+-S)?\s+)?just\A' | setfiletype just | endif
2 changes: 0 additions & 2 deletions tests/cases/ftdetect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,5 @@
not_justfile: true

- content: "#!/usr//bin/env just -f\n"
not_justfile: true

- content: "#!//usr/local/bin/just -f\n"
not_justfile: true

0 comments on commit b46dabb

Please sign in to comment.