Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow quotes in a register call #4793

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Allow quotes in a register call
  • Loading branch information
sophiajt committed Mar 9, 2022
commit cd5451593988c91cce8bb5ec2430959119947050
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