nushell: Nu does not resolve auto-completed files/folders paths with "\", and does not auto-complete paths with "/"
Describe the bug
When attempting to open a file in Nu to a valid path using / as a path separator, Nu works as expected. However, tab-based autocomplete of file paths does not work.
When attempting to open a file in Nu to an equally valid path using \ as a separator, Nu’s tab-based autocompletion works as expected. However, attempting to access the file results in the following error:
error: Error opening file: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
┌─ shell:1:6
│
1 │ open ~\.gitconfig
│ ^^^^^^^^^^^^ Error opening file
To Reproduce Steps listed in the description.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Configuration (please complete the following information):
- Windows 10
- 0.17.0
- Optional features (if any): Stable
Shown on video to @fdncred.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (3 by maintainers)
@pwnorbitals I assigned you. Have at it.
If the only issue right now is
canonicalize, it’s probably here: https://github.com/nushell/nushell/blob/a36d2a1586fda5f5f70c065e898455527d265512/crates/nu-cli/src/commands/open.rs#L195-L201If it still has trouble opening the file, there’s no clear location where that could be happening, but if I had to guess it would be https://github.com/nushell/nushell/blob/a36d2a1586fda5f5f70c065e898455527d265512/crates/nu-cli/src/commands/open.rs#L216