[File] [PATCH] env -S in shebang lines

admin at nosuck.org admin at nosuck.org
Sat Apr 11 04:26:31 EDT 2026


GNU env has many options, but -S is the only one intended for shebang lines.   
Please consider recognizing it.  Here is my attempt.

Thank you for maintaining this essential utility.
-------------- next part --------------
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index 4ce97766..7d73989c 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -41,0 +42,2 @@
+0	string/fwt	#!\ /usr/bin/env\ -S\ zsh 	Paul Falstad's zsh script text executable
+!:mime	text/x-shellscript
@@ -77,0 +80,5 @@
+0	string/fwt	#!\ /usr/bin/env\ -S\ lua 	Lua script text executable
+!:mime	text/x-lua
+0	string/fwt	#!\ /bin/env\ -S\ lua 	Lua script text executable
+!:mime	text/x-lua
+
@@ -102,0 +110,5 @@
+0	string/fwt	#!\ /usr/bin/env\ -S\ bash 	Bourne-Again shell script text executable
+!:mime	text/x-shellscript
+0	string/fwt	#!\ /bin/env\ -S\ bash 	Bourne-Again shell script text executable
+!:mime	text/x-shellscript
+
@@ -116,0 +129,2 @@
+0	string/fwt	#!\ /usr/bin/env\ -S\ fish 		fish shell script text executable
+!:mime	text/x-shellscript
@@ -126,0 +141,4 @@
+0	search/1/fwt	#!\ /usr/bin/env\ -S\ texlua 	LuaTex script text executable
+!:mime	text/x-luatex
+0	search/1/fwt	#!\ /bin/env\ -S\ texlua 	LuaTex script text executable
+!:mime	text/x-luatex
@@ -153,0 +172,2 @@
+0	string/fwt	#!\ /usr/bin/env\ -S\ execlineb 		execline script text executable
+!:mime	text/x-execline
@@ -233 +253,4 @@
-0	string/fwt	#!\ /usr/bin/env\ julia Julia script executable
+0	string/fwt	#!\ /usr/bin/env\ julia	Julia script executable
+0	string/fwt	#!\ /usr/bin/env\ -S\ runghc 	GHC script executable
+0	string/fwt	#!\ /usr/bin/env\ -S\ runhaskell 	Haskell script executable
+0	string/fwt	#!\ /usr/bin/env\ -S\ julia 	Julia script executable


More information about the File mailing list