Skip to content

Commit

Permalink
Allow quotes in a register call (#4793)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiajt committed Mar 9, 2022
1 parent e0fac7b commit 925e9f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/nu-parser/src/parse_keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,8 @@ pub fn parse_register(
.get(0)
.map(|expr| {
let name_expr = working_set.get_span_contents(expr.span);

let name_expr = trim_quotes(name_expr);
String::from_utf8(name_expr.to_vec())
.map_err(|_| ParseError::NonUtf8(expr.span))
.and_then(move |name| {
Expand Down

0 comments on commit 925e9f4

Please sign in to comment.