diff options
author | Rory Dudley | 2024-07-03 15:23:54 -0600 |
---|---|---|
committer | Rory Dudley | 2024-07-03 15:23:54 -0600 |
commit | af66f66f9d7b4a977ffd2420211704c050f23da8 (patch) | |
tree | 242054c0cf14dac113b628d138a0783720a5e381 | |
parent | 44fefed589432fb5ecdca443467384be10caccab (diff) | |
download | dwarvish-af66f66f9d7b4a977ffd2420211704c050f23da8.tar.gz |
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.
-rw-r--r-- | src/poem/recite.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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); |