From af66f66f9d7b4a977ffd2420211704c050f23da8 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Wed, 3 Jul 2024 15:23:54 -0600 Subject: Fix a bug with environment variables in the shell The code to find and replace environment variables was only searching for alphanumeric characters. This means that the shell was unable to recognize environment variables that used an underscore, for instance. This patch allows the underscore character to be used when settings and reading environment variables. --- src/poem/recite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/poem/recite.rs b/src/poem/recite.rs index 89f71c8..422238f 100644 --- a/src/poem/recite.rs +++ b/src/poem/recite.rs @@ -44,7 +44,7 @@ impl Reciteable for Poem { let bytes = word.as_bytes(); while idx < word.len() { let c = bytes[idx] as char; - if !c.is_alphanumeric() { + if !c.is_alphanumeric() && c != '_' { break; } name.push(c); -- cgit v1.2.3