![Camden Cheek](/assets/img/avatar_default.png)
This fixes issue #11. Previously, we required environment variable names to be one ASCII letter followed by one or more characters, but this makes the following characters optional.
125 lines
3.2 KiB
Plaintext
125 lines
3.2 KiB
Plaintext
================================================================================
|
|
Quoted value
|
|
================================================================================
|
|
|
|
ENV TEST="okay"
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (double_quoted_string))))
|
|
|
|
================================================================================
|
|
Unquoted value
|
|
================================================================================
|
|
|
|
ENV TEST_2=value\ 2
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (unquoted_string))))
|
|
|
|
=========================================================
|
|
Single-letter variable
|
|
=========================================================
|
|
|
|
ENV X=42
|
|
|
|
---
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
(unquoted_string)
|
|
(unquoted_string))))
|
|
|
|
================================================================================
|
|
Multiple
|
|
================================================================================
|
|
|
|
ENV TEST="foo" TEST_2=foo\ bar
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (double_quoted_string))
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (unquoted_string))))
|
|
|
|
================================================================================
|
|
Multiline
|
|
================================================================================
|
|
|
|
ENV TEST1="foo" \
|
|
TEST2=bar
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (double_quoted_string))
|
|
(line_continuation)
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (unquoted_string))))
|
|
|
|
================================================================================
|
|
Multiple instructions
|
|
================================================================================
|
|
|
|
ENV TEST1="foo"
|
|
ENV TEST2="bar"
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (double_quoted_string)))
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (double_quoted_string))))
|
|
|
|
================================================================================
|
|
Space syntax
|
|
================================================================================
|
|
|
|
ENV TEST1 foo
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (unquoted_string))))
|
|
|
|
================================================================================
|
|
Space syntax 2
|
|
================================================================================
|
|
|
|
ENV TZ America/Toronto
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(env_instruction
|
|
(env_pair
|
|
name: (unquoted_string)
|
|
value: (unquoted_string))))
|