Skip to content
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

zsh_history breaks #262

Closed
AnirudhG07 opened this issue Jan 9, 2025 · 5 comments · Fixed by #263
Closed

zsh_history breaks #262

AnirudhG07 opened this issue Jan 9, 2025 · 5 comments · Fixed by #263
Labels
bug Something isn't working

Comments

@AnirudhG07
Copy link

AnirudhG07 commented Jan 9, 2025

Description
When I run Ctrl-R or simply go to the zsh-history channel. it breaks

Example

$ tWell, this is embarrassing.                                             0 / 0                                                              

television had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/var/folders/ms/vc5jg4yn5mq4lj8t6qk1qs8c0000gn/T/report-d5f9077b-63d7-49bd-9ff5-6eb1dc232701.toml". Submit an issue or email with the subject of "television Crash Report" and include the report as an attachment.

- Homepage: https://github.com/alexpasmantier/television
- Authors: Alexandre Pasmantier <[email protected]>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }
Location: /Users/anirudhgupta/.cargo/registry/src/index.crates.io-6f17d22bba15001f/television-channels-0.0.20/src/channels/cable.rs:121

This is a bug. Consider reporting it at https://github.com/alexpasmantier/television

Expected behavior
in Version 0.9.0, it was working just fine, as expected.

Actual behavior

Environment

  • OS: MacOS
  • Rust version: rustup 1.27.1 (1980-01-01), cargo 1.83.0 (5ffbef321 2024-10-29)
  • Project version: 0.9.1
  • [Any other dependency version if needed]

Additional context
Please remove .txt from the file

report-d5f9077b-63d7-49bd-9ff5-6eb1dc232701.toml.txt

@AnirudhG07 AnirudhG07 added the bug Something isn't working label Jan 9, 2025
@AnirudhG07
Copy link
Author

Another bug
When I do ls | tv, it shows this. Ctrl-t after ls, works fine. However the pipe doesnt work.

40292

@xsy420
Copy link

xsy420 commented Jan 9, 2025

you may export LC_ALL="en_US.UTF-8", which will let zsh save history in UTF-8.
image
(It works fine on archlinux)
television 0.9.1
target triple: x86_64-unknown-linux-gnu
build: 1.83.0 (2025-01-09)

@alexpasmantier
Copy link
Owner

The first issue is your zsh history not containing valid utf-8. I guess television could just filter out the lines that aren't utf-8 instead of crashing entirely, will add that to the next release.

In the meantime, you could set LC_ALL="en_US.UTF-8" as @xsy420 pointed out to make sure zsh produces utf-8.

Another bug
When I do ls | tv, it shows this. Ctrl-t after ls, works fine. However the pipe doesnt work.

This is just your input containing ansi formatting escape sequences which aren't currently being parsed by tv (I'm working on that as we speak and it'll soon be released).

@alexpasmantier
Copy link
Owner

See #263

And I'll soon issue a release for ansi formatting @AnirudhG07 😊

@AnirudhG07
Copy link
Author

AnirudhG07 commented Jan 10, 2025

Thanks so much!

The zsh_history works great! but the ls | tv does not. (I didnt set what you asked to export. since ill just use ctrl-t for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants