dotenv.net icon indicating copy to clipboard operation
dotenv.net copied to clipboard

Multi-line values are not supported

Open hiredgunhouse opened this issue 4 years ago • 4 comments

As per title it would be good if multi-line values would be supported. For example certificate public/private keys are not supported.

hiredgunhouse avatar Jun 15 '20 13:06 hiredgunhouse

A quick proposal:

  1. Values surrounded with double-quote (") could be multi-line.
  2. Double-quote (") char could be escaped with back-slack () to be treated literally
  3. Back-slash () char could be be escaped with another back-slash () to be treated literally but that would only be necessary if back-slash () char would be followed by the double-quote (") char.
  4. Rules 2 & 3 would be effective only for values that start with double-quote (") char

Examples:

X="I'm a multi-line variable"

Y="I'm a multi-line variable with a " double-quote sign"

Z="I'm a multi-line variable with a \ back-slash sign"

ZZ="I'm a multi-line variable with a \" back-slash and double-quote sign char pair sign"

and also

ZZZ="I'm a multi-line variable \"

hiredgunhouse avatar Jun 15 '20 18:06 hiredgunhouse

+1 for this request

lechgu avatar Oct 16 '21 16:10 lechgu

+1

drs9222 avatar Aug 26 '22 20:08 drs9222