commit 391720977a4c50955547e56171604332e714e736
parent d82be8ca1297e2bcd1d2c96dd4df7ead035f490a
Author: hhvn <dev@hhvn.uk>
Date: Sun, 2 Jan 2022 17:35:32 +0000
.c/n/f/rcshell.vim: make sure the shebang is actually a shebang
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/.config/nvim/ftdetect/rcshell.vim b/.config/nvim/ftdetect/rcshell.vim
@@ -3,7 +3,9 @@ autocmd BufRead,BufNewFile .rcrc*,rcrc, set filetype=rcshell
function! s:DetectRcShell()
let shebang = getline(1)
if shebang =~# '\(/\|\s\)rc$'
+ if shebang =~# '^#!'
set filetype=rcshell
+ endif
endif
endfunction