From c5948f87009193a8bee59198c294acd63b9d74a2 Mon Sep 17 00:00:00 2001 From: Fred Hamster Date: Mon, 16 Dec 2024 15:27:12 -0500 Subject: [PATCH] sanitized user names are available now. --- scripts/core/variables.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index e66a3aca..b0bc95a6 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -38,7 +38,11 @@ return 0 echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/cygdrive\/\1\/\2/' } - + # a handy helper method that turns a potentially gross USER variable into + # a nice clean one (by removing email domains). + function sanitized_username() { + echo $USER | sed -e 's/@[a-zA-Z0-9_.]*//' + } ############## -- 2.34.1