allow more env paths
This commit is contained in:
@@ -28,7 +28,6 @@ nix-shell shebang no env
|
|||||||
(source_file
|
(source_file
|
||||||
(first_line))
|
(first_line))
|
||||||
|
|
||||||
|
|
||||||
==================
|
==================
|
||||||
nix-shell shebang whitespace no env
|
nix-shell shebang whitespace no env
|
||||||
==================
|
==================
|
||||||
@@ -38,3 +37,23 @@ nix-shell shebang whitespace no env
|
|||||||
|
|
||||||
(source_file
|
(source_file
|
||||||
(first_line))
|
(first_line))
|
||||||
|
|
||||||
|
==================
|
||||||
|
nix-shell shebang via relative env
|
||||||
|
==================
|
||||||
|
|
||||||
|
#!env nix-shell
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(first_line))
|
||||||
|
|
||||||
|
==================
|
||||||
|
nix-shell shebang via /bin/env
|
||||||
|
==================
|
||||||
|
|
||||||
|
#!/bin/env nix-shell
|
||||||
|
---
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(first_line))
|
||||||
|
@@ -47,8 +47,11 @@ module.exports = grammar({
|
|||||||
),
|
),
|
||||||
|
|
||||||
_shebang_open: $ => '#!',
|
_shebang_open: $ => '#!',
|
||||||
// TODO: allow `usr/bin/env`, `env`
|
_env: $ => choice(
|
||||||
_env: $ => '/usr/bin/env',
|
'/usr/bin/env',
|
||||||
|
'/bin/env',
|
||||||
|
'env',
|
||||||
|
),
|
||||||
_nix_shell: $ => 'nix-shell',
|
_nix_shell: $ => 'nix-shell',
|
||||||
_ws: $ => / +/,
|
_ws: $ => / +/,
|
||||||
_opt_ws: $ => / */,
|
_opt_ws: $ => / */,
|
||||||
|
Reference in New Issue
Block a user