To: vim_dev@googlegroups.com Subject: Patch 9.0.0935 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0935 Problem: When using dash it may not be recognize as filetype "sh". Solution: Add checks for "dash". (Eisuke Kawashima,closes #11600) Files: runtime/autoload/dist/ft.vim, runtime/autoload/dist/script.vim, src/testdir/test_filetype.vim *** ../vim-9.0.0934/runtime/autoload/dist/ft.vim 2022-10-17 13:32:13.677965004 +0100 --- runtime/autoload/dist/ft.vim 2022-11-24 10:48:07.426165454 +0000 *************** *** 712,718 **** if exists("b:is_sh") unlet b:is_sh endif ! elseif name =~ '\' b:is_sh = 1 if exists("b:is_kornshell") unlet b:is_kornshell --- 712,719 ---- if exists("b:is_sh") unlet b:is_sh endif ! elseif name =~ '\' || name =~ '\' ! # Ubuntu links "sh" to "dash", thus it is expected to work the same way b:is_sh = 1 if exists("b:is_kornshell") unlet b:is_kornshell *** ../vim-9.0.0934/runtime/autoload/dist/script.vim 2022-07-05 21:56:36.157190166 +0100 --- runtime/autoload/dist/script.vim 2022-11-24 10:50:35.066613766 +0000 *************** *** 53,60 **** name = 'wish' endif ! # Bourne-like shell scripts: bash bash2 ksh ksh93 sh ! if name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>' call dist#ft#SetFileTypeSH(line1) # csh scripts --- 53,60 ---- name = 'wish' endif ! # Bourne-like shell scripts: bash bash2 dash ksh ksh93 sh ! if name =~ '^\(bash\d*\|dash\|ksh\d*\|sh\)\>' call dist#ft#SetFileTypeSH(line1) # csh scripts *** ../vim-9.0.0934/src/testdir/test_filetype.vim 2022-11-23 22:34:20.063983596 +0000 --- src/testdir/test_filetype.vim 2022-11-24 10:57:26.235344898 +0000 *************** *** 704,709 **** --- 704,716 ---- \ ['__libc_start_main and something']], \ 'clojure': [['#!/path/clojure']], \ 'scala': [['#!/path/scala']], + \ 'sh': [['#!/path/sh'], + \ ['#!/path/bash'], + \ ['#!/path/bash2'], + \ ['#!/path/dash'], + \ ['#!/path/ksh'], + \ ['#!/path/ksh93']], + \ 'csh': [['#!/path/csh']], \ 'tcsh': [['#!/path/tcsh']], \ 'zsh': [['#!/path/zsh']], \ 'tcl': [['#!/path/tclsh'], *** ../vim-9.0.0934/src/version.c 2022-11-24 00:08:58.465010528 +0000 --- src/version.c 2022-11-24 10:51:52.254800597 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 935, /**/ -- You cannot have a baby in one month by getting nine women pregnant. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///