last cleanup i hope
authorFred Hamster <fred@gruntose.com>
Mon, 16 Dec 2024 21:34:31 +0000 (16:34 -0500)
committerFred Hamster <fred@gruntose.com>
Mon, 16 Dec 2024 21:34:31 +0000 (16:34 -0500)
scripts/core/variables.sh

index 758d92eacd2ea2f947e77ea8959943f1a7b6cfe1..3304ba796df8848cf6cabef32422f55b7191ecd0 100644 (file)
@@ -43,7 +43,8 @@ return 0
   export SANITIZED_USER
   function sanitized_username() {
     if [ -z "$SANITIZED_USER" ]; then
-      export SANITIZED_USER="$(echo "$USER" | sed -e 's/@[a-zA-Z0-9_.]*//')"
+#old inefficient...      export SANITIZED_USER="$(echo "$USER" | sed -e 's/@[a-zA-Z0-9_.]*//')"
+      export SANITIZED_USER="${USER//@*/}"
     fi
     echo -n "$SANITIZED_USER"
   }