]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1342: Shebang filetype detection can be improved v9.1.1342
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>
Thu, 24 Apr 2025 20:03:21 +0000 (22:03 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 24 Apr 2025 20:03:21 +0000 (22:03 +0200)
commitf102f4c2e80f5493a02a7b1130f11615d60b6295
tree6f915c903726b3c6f8d682b0fae6a54c38b90c68
parentbcd5995b40a1c26e735bc326feb2e3ac4b05426b
patch 9.1.1342: Shebang filetype detection can be improved

Problem:  Shebang filetype detection can be improved
Solution: Improve detection logic (Eisuke Kawashima)

Vim does not correctly detect filetype from
  - `#!/usr/bin/env --split-string=awk -f`
  - `#!/usr/bin/env -S -i awk -f`
  - `#!/usr/bin/env -S VAR= awk -f`
So update the current detection logic to detect those cases.

closes: #17199

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/script.vim
src/testdir/test_filetype.vim
src/version.c