nushell: Tilde expansion for external commands is surprising and cannot be opted out of
Describe the bug
The encoding of a string can change when passed to an external command:

How to reproduce
^echo "~" | into binary
Expected behavior
I expect nushell to not change the encoding of strings when I’m not looking.
Screenshots

Configuration
| key | value |
|---|---|
| version | 0.73.0 |
| branch | |
| commit_hash | |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.65.0 (897e37553 2022-11-02) |
| rust_channel | stable-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.65.0 (4bc8f24d3 2022-10-20) |
| pkg_version | 0.73.0 |
| build_time | 2023-01-02 18:02:43 +01:00 |
| build_rust_channel | release |
| features | database, dataframe, default, trash, which, zip |
| installed_plugins |
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (10 by maintainers)
Confirmed using strace that we are expanding the tilde when running
semver-explain "~0.5.3":That is bad and we shouldn’t be doing it.
Very OT, (sorry) but it’s actually the right expansions, as
~NAME != ~/NAME.~NAME == Home of user NAME