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
nu 0.60 beta cannot ls in a UNC share
#4863
Comments
|
Hmm, on digging slightly deeper, even on nushell 0.44.0 the UNC support is not great: |
|
I'm betting that our |
|
this seems to work but if i do this |
|
I think this is the problem. Our glob crate doesn't know what to do with VerbatimUNC paths. nushell/crates/nu-glob/src/lib.rs Lines 226 to 239 in 6e69d40
unc path path components |
|
Yes, the bug is specifically about the pwd being a UNC path. I don’t want to have to map a drive letter to use a share. I can’t switch away from powershell without feature parity :) |
|
Ah sorry - reading helps! I raised a similar issue but for drive map use case but didn't pick up on this distinction (folded into here as dup). While being very much on at the start of my Rust (and GitHub) journey and without understanding the implication, but wishing to use nu on a daily basis, I've forked and and swapped \\?\UNC\ to \\ in cwd in env.rs. Hasn't broken yet. If of any use... https://github.com/MCoooo/nushell_hack Hopefully get time to understand what's going on more fully |
|
After removing the condition and using a verbatim path, nu ls does generate a contents list but not as expected. When change directory uses a verbatim path some auto correction takes place where needed (device to unc and case for example). When ls is used directly against a verbatim, there is no autocorrection, however it does generate a list. However verbatim paths currently do no just display the files but some of the path, so I assume the 'name' object is incorrect for use in piped commands. Not sure of the QA benchmarks for changes, but I would argue its better to promote adoption in the Windows (Enterprise) space with this limitation / rough edge. Unless of course more is broken... |
|
I came across this issue trying to CD into WSL. My Ubuntu WSL instance is mapped to U: but the path gets converted to a UNC path. There's an open issue about this for Which leads to a problem with Could this be the problem? |
|
|
|
i'm guessing they're related but someone would have look at the ls code and debug it probably. |
|
Wanted to chime in by saying that recently I've been getting a more aggressive error message. Not sure if this is due to some third-party application or if there are just more debug options in Nu now. I should note here that I have pwd as def pwd [] {
echo $env.PWD | sd \\ /
}Hence the forward slashes, but both manual entry and |
|
@ehawman That's weird. Those look like dotnet errors. nushell doesn't have any dotnet but on Windows it may call into the Windows API that is dotnet. |
|
Good news, UNC issues should be fixed by #6824. The fix will be released in Nushell v0.71. |
|
Fantastic. Great work all. |
|
Thank you so much folks! Especially @ChrisDenton for |




Describe the bug
This works on 0.44.0 (released non-beta). If you
cdto a UNC share in the 0.60.0 beta,lsdoesn't work. Instead of listing files I get an error about./*: not found.I can still
cdto directories I know exist, but listing files fails no matter what directory I'm in on the share.How to reproduce
cdto a UNC share (\servername\sharename)lsExpected behavior
List files in a fancy table
Screenshots
No response
Configuration
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: