mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:25:06 +02:00
Fix env var shorthand when value contains =
(#5022)
This commit is contained in:
@ -4117,7 +4117,7 @@ pub fn parse_expression(
|
||||
// Check if there is any environment shorthand
|
||||
let name = working_set.get_span_contents(spans[pos]);
|
||||
|
||||
let split = name.split(|x| *x == b'=');
|
||||
let split = name.splitn(2, |x| *x == b'=');
|
||||
let split: Vec<_> = split.collect();
|
||||
if split.len() == 2 && !split[0].is_empty() {
|
||||
let point = split[0].len() + 1;
|
||||
|
Reference in New Issue
Block a user