sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
14.31k stars 330 forks source link

yazi process gets killed when you switch to shell and got a nonzero return value #1130

Closed ih8d8 closed 3 months ago

ih8d8 commented 3 months ago

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

Alacritty + tmux

Did you try the latest code to see if this problem got fixed?

Not tried, and I'll explain why below

yazi --debug output

``` Yazi Version: 0.2.5 (Arch Linux 2024-04-27) OS: linux-x86_64 (unix) Debug: false Emulator Emulator.via_env: ("alacritty", "tmux") Emulator.via_csi: Ok(Unknown([])) Emulator.detect: Unknown([]) Adaptor Adaptor.matches: Wayland Desktop XDG_SESSION_TYPE: Some("wayland") WAYLAND_DISPLAY: Some("wayland-1") DISPLAY: Some(":1") SSH shared.in_ssh_connection: false WSL /proc/sys/fs/binfmt_misc/WSLInterop: false Variables SHELL: Some("/bin/bash") EDITOR: Some("vim") ZELLIJ_SESSION_NAME: None YAZI_FILE_ONE: None YAZI_CONFIG_HOME: None file(1) Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.45\nmagic file from /usr/share/file/misc/magic\nseccomp support included\n", stderr: "" }) Text Opener default: Some(Opener { run: "${EDITOR:=vim} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) block: Some(Opener { run: "${EDITOR:=vim} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) tmux TMUX: true Ueberzug++ Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "ueberzugpp 2.9.5\n", stderr: "" }) -------------------------------------------------- ```

Describe the bug

I have these lines in my keymap.toml file:

{ on = [ "'", "r" ],        run = 'shell "rsync -auvP --info=progress2 \"$@\" \"$PWD\"" --block --confirm',                             desc = "Copy with rsync" },
{ on = [ "'", "x" ],        run = 'shell "7z x \"$@\"" --block --confirm',                                                              desc = "Extract password-protected archives" },

Whenever I go to shell and press ctrl+c in the middle of the command run or face some error, the yazi process gets killed and I cannot go back to yazi.

Expected Behavior

I expect to go back to yazi even if I face an error in the shell.

To Reproduce

Add the above key mappings and try to extract a large archive file and then press ctrl+c in the middle of extraction.

Configuration

No response

Anything else?

No response

sxyazi commented 3 months ago

Please try https://github.com/sxyazi/yazi/pull/1131

ih8d8 commented 3 months ago

That seems to solve the issue for me. I could go back to yazi after pressing ctrl+c. Thank you for the quick reply and fix!

However, I noticed another issue related to image previewing in the new version (0.3). I have a laptop connected to an external monitor. The old version correctly shows the preview on one screen. However, the new version stretches the preview to the other screen too.

yazi 0.2.5: 2024-06-06_11:08:13

yazi 0.3: 2024-06-06_11:09:06

sxyazi commented 3 months ago

Please file a new issue with the detailed reproduction steps for the image preview problem.

Let's merge this issue first.

github-actions[bot] commented 2 months ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.