Kévin Le Gouguec
53bd2d57f3
Recognize shebang lines that pass '-S/--split-string' to 'env'
...
* etc/NEWS: announce the change.
* lisp/files.el (auto-mode-interpreter-regexp): Add optional '-S'
switch to the ignored group capturing the env invocation.
Allow multiple spaces between #!, interpreter and first argument:
empirically, Linux's 'execve' accepts that. (Bug#66902)
* test/lisp/files-tests.el (files-tests--check-shebang): New helper to
generate a temporary file with a given interpreter line, and assert
that the mode picked by 'set-auto-mode' is derived from an expected
mode. Write the 'should' form so that failure reports include useful
context; for example:
(ert-test-failed
((should
(equal (list shebang actual-mode) (list shebang expected-mode)))
:form
(equal ("#!/usr/bin/env -S make -f" fundamental-mode)
("#!/usr/bin/env -S make -f" makefile-mode))
:value nil :explanation
(list-elt 1 (different-atoms fundamental-mode makefile-mode))))
* test/lisp/files-tests.el (files-tests-auto-mode-interpreter): New
test; exercise some aspects of 'interpreter-mode-alist'.
2023-11-19 11:05:26 +02:00
..
2023-10-21 12:25:25 +02:00
2023-08-14 17:03:44 +02:00
2023-09-16 19:09:04 +02:00
2023-08-28 22:07:23 +02:00
2023-11-13 12:16:37 +01:00
2023-01-01 05:31:12 -05:00
2023-11-18 12:34:56 -08:00
2023-11-12 11:08:40 -08:00
2023-01-01 05:31:12 -05:00
2023-10-28 05:06:21 -04:00
2023-08-03 11:40:44 +03:00
2023-09-23 09:32:57 -04:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-11-03 15:24:21 -07:00
2023-11-18 06:07:48 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-11-11 21:40:12 -08:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-01 14:39:30 +02:00
2023-02-17 22:50:13 +01:00
2023-06-03 10:27:46 +03:00
2023-09-04 18:25:18 +02:00
2023-03-18 12:35:10 +02:00
2023-10-23 12:59:13 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-05-10 14:48:34 +02:00
2023-01-01 05:31:12 -05:00
2023-08-13 18:31:47 +02:00
2023-01-01 05:31:12 -05:00
2023-09-04 18:25:18 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-16 21:27:50 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-21 17:05:53 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-03-29 22:18:28 +02:00
2023-08-14 17:03:44 +02:00
2023-01-01 05:31:12 -05:00
2023-10-28 06:42:48 +00:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:47:47 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-29 00:48:54 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-10-12 11:02:53 +02:00
2023-11-19 11:05:26 +02:00
2023-03-13 18:02:36 +01:00
2023-05-30 17:44:53 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-08 03:54:02 +02:00
2023-01-01 05:31:12 -05:00
2023-09-17 22:56:00 +02:00
2023-01-01 05:31:12 -05:00
2023-02-18 10:45:12 +02:00
2023-04-07 19:08:33 +02:00
2023-01-01 05:31:12 -05:00
2023-09-04 18:25:18 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-03-14 19:36:47 +00:00
2023-02-24 11:43:08 +01:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-11-11 16:13:52 +00:00
2023-07-01 12:41:09 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-29 21:40:38 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-19 14:21:34 -04:00
2023-01-01 05:31:12 -05:00
2023-09-04 18:25:18 +02:00
2023-07-08 19:30:06 +03:00
2023-09-16 19:09:04 +02:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-11-16 09:57:33 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-09-04 18:25:18 +02:00
2023-03-10 11:22:54 +01:00
2023-09-04 18:25:18 +02:00
2023-11-04 21:46:27 -07:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-08-03 17:04:41 +03:00
2023-01-01 05:31:12 -05:00
2023-03-02 14:21:33 +02:00
2023-01-01 05:47:47 -05:00
2023-09-16 12:56:34 +03:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00
2023-01-01 05:31:12 -05:00