From: Fred Hamster Date: Mon, 16 Dec 2024 20:27:12 +0000 (-0500) Subject: sanitized user names are available now. X-Git-Tag: 2.140.189^2~74 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=c5948f87009193a8bee59198c294acd63b9d74a2;p=feisty_meow.git sanitized user names are available now. --- 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_.]*//' + } ##############