The rules are different in the shell and in dotenv. This is confusing. Is it possible to adopt the shell rules?
These rules apply to dotenv (from the README):
VAR=one
VAR_2=two
# Curly braces are useful in cases when we need to use a variable with non-alphanumeric name
RESULT=$VAR_2 #value: 'one_2' since $ with no curly braces stops after first non-alphanumeric symbol
RESULT=${VAR_2} #value: 'two'
In Bourne shell the rules are different:
VAR=one
VAR_2=two
RESULT=$VAR_2 #value: 'two' since $ with no curly braces uses as much as possible
RESULT=${VAR_2} #value: 'two' same thing
RESULT=${VAR}_2 #value: 'one_2', the curly brace mark the end of the variable name
The rules are different in the shell and in dotenv. This is confusing. Is it possible to adopt the shell rules?
These rules apply to dotenv (from the
README
):In Bourne shell the rules are different: