diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-16 15:28:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-16 15:28:10 +0000 |
commit | b1b163efd7bb3ca68cce101d4e431559d2944a8e (patch) | |
tree | b31b1181058410bf9541bdfa143fa62fe7ffdec2 | |
parent | 1be7e215830d6ec9aa6200aac4ef34ac0ae85af5 (diff) |
patch 8.2.3603: fish filetype not recognizedv8.2.3603
Problem: Fish filetype not recognized.
Solution: Add a file pattern and match script line. (Doug Kearns)
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/scripts.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 8fd2fc04a1..875823c482 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -617,6 +617,9 @@ autocmd BufRead,BufNewFile *.fnl setf fennel " Fetchmail RC file au BufNewFile,BufRead .fetchmailrc setf fetchmail +" Fish shell +au BufNewFile,BufRead *.fish setf fish + " FlexWiki - disabled, because it has side effects when a .wiki file " is not actually FlexWiki "au BufNewFile,BufRead *.wiki setf flexwiki diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 79fd0a77e9..0ff8e49088 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -194,6 +194,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'rsc\>' set ft=routeros + " Fish shell + elseif s:name =~# 'fish\>' + set ft=fish + endif unlet s:name diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 90bc159f1e..6376334f0f 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -180,6 +180,7 @@ let s:filename_checks = { \ 'fennel': ['file.fnl'], \ 'fetchmail': ['.fetchmailrc'], \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'], + \ 'fish': ['file.fish'], \ 'focexec': ['file.fex', 'file.focexec'], \ 'forth': ['file.fs', 'file.ft', 'file.fth'], \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'], @@ -662,6 +663,7 @@ let s:script_checks = { \ 'pascal': [['#!/path/instantfpc']], \ 'fennel': [['#!/path/fennel']], \ 'routeros': [['#!/path/rsc']], + \ 'fish': [['#!/path/fish']], \ } " Various forms of "env" optional arguments. diff --git a/src/version.c b/src/version.c index 5d3d2a36aa..1c8c955b6d 100644 --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3603, +/**/ 3602, /**/ 3601, |