Fix doom-load-envvars-file
A former regexp consumed the first letter of each environment variable's name.
This commit is contained in:
parent
29055ae6a3
commit
280a2407ab
1 changed files with 2 additions and 2 deletions
|
@ -421,9 +421,9 @@ in interactive sessions, nil otherwise (but logs a warning)."
|
||||||
(let (vars)
|
(let (vars)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents file)
|
(insert-file-contents file)
|
||||||
(while (re-search-forward "\n *[^#] *\\([^= \n]+\\)=" nil t)
|
(while (re-search-forward "\n *\\([^#][^= \n]+\\)=" nil t)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((var (match-string 1))
|
(let ((var (string-trim-left (match-string 1)))
|
||||||
(value (buffer-substring-no-properties
|
(value (buffer-substring-no-properties
|
||||||
(point)
|
(point)
|
||||||
(1- (or (when (re-search-forward "^\\([^= ]+\\)=" nil t)
|
(1- (or (when (re-search-forward "^\\([^= ]+\\)=" nil t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue