nushell / nushell

A new type of shell
https://www.nushell.sh/
MIT License
30.89k stars 1.58k forks source link

Escape characters in single quoted strings are interpreted when prefixing with caret. #13051

Closed sebakri closed 4 weeks ago

sebakri commented 4 weeks ago

Describe the bug

image

How to reproduce

  1. Type in smth including escape characters, prefixed with a caret and surrounded with single quotes. Eg.

^'C:\Foo\Bar'

Expected behavior

https://www.nushell.sh/lang-guide/chapters/strings_and_text.html#single-quotes

Screenshots

No response

Configuration

key value
version 0.94.1
major 0
minor 94
patch 1
branch
commit_hash f3cf693ec701ab3086f984a8aeadfc9b50fadd90
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.77.2 (25ef9e3d8 2024-04-09)
rust_channel 1.77.2-x86_64-pc-windows-msvc
cargo_version cargo 1.77.2 (e52e36006 2024-03-26)
build_time 2024-05-30 23:14:11 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash, which
installed_plugins

Additional context

I noticed the problem in init.nu generated by starship.

https://github.com/starship/starship/issues/6013

kubouch commented 4 weeks ago

Try the latest 0.94.2 release, we fixed a similar issue there.

sebakri commented 4 weeks ago

Perfect. It's fixed in 0.94.2.

Great job! Thank you 😃