From 570b4f51cbd6eeef8893fdd3f25df9b39dd95b22 Mon Sep 17 00:00:00 2001 From: Tim Hassett Date: Fri, 16 Nov 2018 11:53:56 +1100 Subject: [PATCH] Added format option to not wrap param value in single quotes --- README.md | 6 ++++++ aws-env.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index cfb0e24..48e8387 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ Searches for SSM Parameters in your AWS account based on the variables provided DB_USERNAME='Username' DB_PASSWORD='SecretPassword' ``` + * `unquoted-shell` + ```bash + DB_HOST=mysql + DB_USERNAME=Username + DB_PASSWORD=SecretPassword + ``` ### Command Line diff --git a/aws-env.go b/aws-env.go index 3adb2e4..ec77e85 100644 --- a/aws-env.go +++ b/aws-env.go @@ -120,6 +120,8 @@ func FormatParameter(key string, value string, format string) string { switch format { case "shell": return fmt.Sprintf("%s='%s'\n", key, value) + case "unquoted-shell": + return fmt.Sprintf("%s=%s\n", key, value) default: return fmt.Sprintf("export %s=$'%s'\n", key, value) }