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

PowerSession does not work properly #44

Open
axdank opened this issue Aug 17, 2022 · 2 comments · Fixed by #48 or #53
Open

PowerSession does not work properly #44

axdank opened this issue Aug 17, 2022 · 2 comments · Fixed by #48 or #53
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@axdank
Copy link

axdank commented Aug 17, 2022

Hello, I think this program is very necessary but in my case I found multiple problems.

  1. I have run PowerSession with the shell (Nushell), when I give exit, the console crashes leaving it unusable (When using pwsh the console does not crash).

terminal-broken-1

  1. I think the main use of this is not only for recording command executions, but also programs or text editors like helix or neovim.
    When running helix, there is a panic in the program (record.rs:134:72), String::from_utf8 section (I have tried with neovim and the same thing happens), rarely in the buffer invalid utf8 sequences are received (but when running normally these programs, the terminal has no complaints, also helix is written in rust, and everything is supposed to be utf8 ).

terminal-broken-2

  1. I changed from String::from_utf8 to String::from_utf8_lossy, to try to run helix again.

imagen

  1. When running, it works, but the program is completely distorted, which makes it unusable.

terminal-broken-3

  1. Same procedures with pwsh, the only thing is that when you exit powersession, the terminal still works fine and does not break.

terminal-broken-4

Os: Windows 11
Terminal Emulator: Windows Terminal
Shell: Nushell
Rust version: 1.62.1

@ibigbug ibigbug added the bug Something isn't working label Aug 21, 2022
@ibigbug ibigbug self-assigned this Aug 21, 2022
@ibigbug ibigbug mentioned this issue Aug 27, 2022
@ibigbug ibigbug reopened this Aug 27, 2022
@ibigbug
Copy link
Member

ibigbug commented Aug 27, 2022

the utf8 issue should get fixed in this https://github.com/Watfaq/PowerSession-rs/pull/49/files

while the messed up output seems to be something related to console mode https://docs.microsoft.com/en-us/windows/console/setconsolemode

trying to figure it out

@sitiom
Copy link
Contributor

sitiom commented Sep 3, 2022

@ibigbug Were you supposed to publish 0.1.7 but it failed (66e8830)?

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

Successfully merging a pull request may close this issue.

3 participants