From 4f7270df65d7c79222ab29b8628f251eee16053b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 26 May 2020 14:25:08 +0000 Subject: New envfile format; prepare for 2.6.1.0 --- doc/envfile.html | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'doc/envfile.html') diff --git a/doc/envfile.html b/doc/envfile.html index 5c0523c..713b6ae 100644 --- a/doc/envfile.html +++ b/doc/envfile.html @@ -55,19 +55,32 @@ it execs into prog.

file is a text file containing lines of the form key = value. -Whitespace is permitted before and after key, and before or after value, -but key or value can never contain whitespace. No quoting -is possible. +Whitespace is permitted before and after key, and before or after value.

Empty lines, or lines containing only whitespace, are ignored. Lines beginning with # (possibly after some whitespace) are ignored (and typically used for comments). -Comments are also possible at the end of lines: -key = value # comment is a valid line. Note that there -must be whitespace between value and # -in this case (else # is just read as a part of value). +Leading and trailing whitespace is stripped from values; but a +value can be double-quoted, which allows for inclusion of leading +and trailing whitespace. +

+ +

+ A non-commented line that ends with a backslash ("\") is +concatenated with the following one, and the newline character is +ignored. If a backslashed newline happens before the start of a +value, then the whitespace at the beginning of the new line will be +part of the value (i.e. leading whitespace on a new line is not +stripped). +

+ +

+ C escapes, including hexadecimal and octal sequences, are supported +in quoted values. Unicode codepoint sequences are not supported. It +is possible to include a newline in a quoted value by using \n; +but including newlines in environment variables is not recommended.

@@ -78,16 +91,21 @@ added to the environment, with an empty value. If you do not want the environment.

+

+ The envfile format is largely compatible with systemd's +EnvironmentFile +format, which allows for the reuse of such files outside of systemd. +

+

Notes

-- cgit v1.3.1