You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single quotes should prevent expansion of '~' #4205
A:file-systemRelated to commands and core nushell behavior around the file systemA:quoting-expansionIssues related to string quoting, interpolation, and expansion of variable or glob patterns
In our upcoming engine, I believe that it'll be expanded in both places so your ^mkdir would fail to create a new directory.
Can you say more about what shells you're coming from that don't use ~ as home? I'm honestly a bit surprised, I thought it was nearly universal (with the exception of maybe something on Windows)
In Nushell ' and " quotes are treated equal, similar to Python.
I guess we could add, e.g., --noexpand flag to the filesystem commands to prevent them from expanding the paths. My personal use case for this is when debugging Nushell, sometimes I end up with weird files and directories that are called ~/ for example. You don't want to call rm on that 😀.
It looks like #7711 only changes how tilde-expansion is done for external commands; why not make it consistent and always suppress tilde-expansion inside of quotes?
A:file-systemRelated to commands and core nushell behavior around the file systemA:quoting-expansionIssues related to string quoting, interpolation, and expansion of variable or glob patterns
Activity
sophiajt commentedon Dec 13, 2021
In our upcoming engine, I believe that it'll be expanded in both places so your
^mkdirwould fail to create a new directory.Can you say more about what shells you're coming from that don't use ~ as home? I'm honestly a bit surprised, I thought it was nearly universal (with the exception of maybe something on Windows)
kubouch commentedon Dec 13, 2021
In Nushell
'and"quotes are treated equal, similar to Python.I guess we could add, e.g.,
--noexpandflag to the filesystem commands to prevent them from expanding the paths. My personal use case for this is when debugging Nushell, sometimes I end up with weird files and directories that are called~/for example. You don't want to callrmon that 😀.don't expand tilde if we quote external arguments (#7711)
BatmanAoD commentedon Oct 26, 2023
It looks like #7711 only changes how tilde-expansion is done for external commands; why not make it consistent and always suppress tilde-expansion inside of quotes?