From: Stanislaw Gruszka Date: Mon, 22 Dec 2025 18:17:36 +0000 (+0000) Subject: patch 9.1.2007: filetype: bpftrace hashbang lines are not recognized X-Git-Tag: v9.1.2007^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2814754c0cd39875adcadffcb73206a83a46099;p=thirdparty%2Fvim.git patch 9.1.2007: filetype: bpftrace hashbang lines are not recognized Problem: bpftrace files are not recognized from the hashbang line. Solution: Add a hashbang check (Stanislaw Gruszka) closes: #18992 Signed-off-by: Stanislaw Gruszka Signed-off-by: Christian Brabandt --- diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim index 5fb45ccc51..de168f0c09 100644 --- a/runtime/autoload/dist/script.vim +++ b/runtime/autoload/dist/script.vim @@ -4,7 +4,7 @@ vim9script # Invoked from "scripts.vim" in 'runtimepath' # # Maintainer: The Vim Project -# Last Change: 2025 Aug 09 +# Last Change: 2025 Dec 22 # Former Maintainer: Bram Moolenaar export def DetectFiletype() @@ -233,6 +233,10 @@ export def Exe2filetype(name: string, line1: string): string elseif name =~ '^execlineb\>' return 'execline' + # Bpftrace + elseif name =~ '^bpftrace\>' + return 'bpftrace' + # Vim elseif name =~ '^vim\>' return 'vim' diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 65f8bae328..6392f6996e 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -1095,6 +1095,7 @@ def s:GetScriptChecks(): dict>> ['#!/path/regina']], janet: [['#!/path/janet']], dart: [['#!/path/dart']], + bpftrace: [['#!/path/bpftrace']], vim: [['#!/path/vim']], } enddef diff --git a/src/version.c b/src/version.c index 12dfb27af9..ce81ba547c 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2007, /**/ 2006, /**/