Skip to content

Commit 4fa7cd6

Browse files
braduranigeoffharcourt
authored andcommitted
Filter commented lines out of .env in envup
Makes envup filter out comments in the .env file even if the line starts with whitespace
1 parent 346268b commit 4fa7cd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zsh/functions/envup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function envup() {
44
if [ -f .env ]; then
5-
export $(cat .env)
5+
export $(sed '/^ *#/ d' .env)
66
else
77
echo 'No .env file found' 1>&2
88
return 1

0 commit comments

Comments
 (0)