From 2a3412def6828254350b3d8bf9ce95ab5ea8296f Mon Sep 17 00:00:00 2001 From: Luca Ferrari Date: Mon, 20 Jun 2022 09:17:32 +0200 Subject: [PATCH] Use `export` also in commented out variables. Place the export command also on configuration lines that are commented out, so that the user can easily uncomment those lines and get the variable globally scoped. See #54 --- bin/pgenv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pgenv b/bin/pgenv index 06ec738..693ab59 100755 --- a/bin/pgenv +++ b/bin/pgenv @@ -2,7 +2,7 @@ # # VERSION # -PGENV_VERSION="1.3.0" +PGENV_VERSION="1.3.1" # https://stackoverflow.com/a/19622569/79202 trap 'exit' ERR @@ -629,7 +629,7 @@ pgenv_configuration_write_variable(){ if [ -z "$value" ]; then echo -n "#" >> "$file" fi - echo "${name}='${value}'" >> "$file" + echo "export ${name}='${value}'" >> "$file" fi echo >> "$file" }