nushell/nushell
Unsupport type from raw stream while piping file with invalid UTF-8 bytes
Chiusa
#6880 aperta il 24 ott 2022
category:bugcategory:inconsistent-behaviorgood first issue
Metriche repository
- Star
- (39.478 stelle)
- Metriche merge PR
- (Merge medio 4g 1h) (123 PR mergiate in 30 g)
Descrizione
Describe the bug
In this case I had some invalid UTF-8 bytes in ~/.zsh_history file.
❯ : open ~/.zsh_history | lines
Error: nu::shell::unsupported_input (link)
× Unsupported input
╭─[entry #17:1:1]
1 │ open ~/.zsh_history | lines
· ──┬─
· ╰── Unsupport type from raw stream
╰────
While
❯ : open ~/.zsh_history | describe
raw input
as expected.
Raw flag does not help either:
❯ : open -r ~/.zsh_history | lines
Error: nu::shell::unsupported_input (link)
× Unsupported input
╭─[entry #23:1:1]
1 │ open -r ~/.zsh_history | lines
· ──┬─
· ╰── Unsupport type from raw stream
╰────
How to reproduce
- Run
open some_invalid_utf8_bytes_file.txt | lines
Expected behavior
Expected to produce lines from the the file keeping invalid utf-8 characters
Screenshots
No response
Configuration
❯ : version | transpose key value | to md --pretty
| key | value |
|---|---|
| version | 0.70.0 |
| branch | |
| commit_hash | |
| build_os | macos-aarch64 |
| build_target | aarch64-apple-darwin |
| rust_version | rustc 1.64.0 |
| cargo_version | cargo 1.64.0 (387270bc7 2022-09-16) |
| pkg_version | 0.70.0 |
| build_time | 2022-10-18 18:13:36 +00:00 |
| build_rust_channel | release |
| features | database, dataframe, default, trash, which, zip |
| installed_plugins |
Additional context
I am trying to port my zsh history into nushell.