From d6195ad6d75a76ffd5126bec28c9e91c8063974f Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Thu, 4 Mar 2021 16:19:55 +0100 Subject: [PATCH] Undercore `-` values in the domain too --- abra | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/abra b/abra index 65b2ae04..fef885ca 100755 --- a/abra +++ b/abra @@ -712,6 +712,8 @@ OPTIONS } sub_app_new (){ + shopt -s extglob + require_abra_dir get_servers @@ -750,7 +752,7 @@ sub_app_new (){ fi if [ -z "$APP_NAME" ]; then - DEFAULT_NAME="${TYPE/-/}_${DOMAIN//./_}" + DEFAULT_NAME="${TYPE/-/_}_${DOMAIN//+([.-])/_}" read -rp "App name [$DEFAULT_NAME]: " APP_NAME if [ -z "$APP_NAME" ]; then APP_NAME="$DEFAULT_NAME"