From 4e8cb38bcde23e41b764e0c340cd3a55651f5c11 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Wed, 1 Apr 2020 16:23:45 +0000 Subject: [PATCH] fix config regex to work on mac --- lib/bashly/templates/lib/config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bashly/templates/lib/config.sh b/lib/bashly/templates/lib/config.sh index 93606e49..b79f4221 100644 --- a/lib/bashly/templates/lib/config.sh +++ b/lib/bashly/templates/lib/config.sh @@ -21,7 +21,7 @@ config_init() { # Usage: result=$(config_get hello) config_get() { key=$1 - regex="^$key\s*=\s*(.+)$" + regex="^$key *= *(.+)$" config_init @@ -44,7 +44,7 @@ config_set() { config_init - regex="^($key)\s*=\s*.+$" + regex="^($key) *= *.+$" output="" found_key="" @@ -71,7 +71,7 @@ config_set() { config_del() { key=$1 - regex="^($key)\s*=" + regex="^($key) *=" output="" config_init @@ -100,7 +100,7 @@ config_show() { # done # config_keys() { - regex="^([a-zA-Z0-9_\-]+)\s*=" + regex="^([a-zA-Z0-9_\-]+) *=" config_init