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

shell not blocking #2184

Closed
3 tasks done
pcause opened this issue Jan 9, 2025 · 4 comments
Closed
3 tasks done

shell not blocking #2184

pcause opened this issue Jan 9, 2025 · 4 comments
Labels
invalid This doesn't seem right

Comments

@pcause
Copy link

pcause commented Jan 9, 2025

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

wezterm / tmux

yazi --debug output

Yazi
    Version: 0.4.3 (1e0c5ff 2025-01-09)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.83.0 (90b35a62 2024-11-26)

Ya
    Version: 0.4.3 (1e0c5ff 2025-01-09)

Emulator
    Brand.from_env      : Some(WezTerm)
    Emulator.detect     : Emulator { kind: Left(WezTerm), light: false, cell_size: Some((11, 23)) }
    Emulator.detect_full: Ok(Emulator { kind: Left(WezTerm), light: false, cell_size: Some((11, 23)) })

Adapter
    Adapter.matches: Iip

Desktop
    XDG_SESSION_TYPE           : Some("wayland")
    WAYLAND_DISPLAY            : Some("wayland-0")
    DISPLAY                    : Some(":0")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

NVIM
    NVIM          : false
    Neovim version: 0.10.2

Variables
    SHELL           : Some("/usr/bin/zsh")
    EDITOR          : Some("/usr/bin/nvim")
    VISUAL          : Some("/usr/bin/nvim")
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : 2
    tmux version       : tmux 3.5a
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.45
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.0.2 / 7.0.2
    pdftoppm      : 24.08.0
    magick        : 7.1.1-41
    fzf           : 0.57.0
    fd/fdfind     : 10.1.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : 1.14.5
    zoxide        : No such file or directory (os error 2)
    7z/7zz        : 16.02 / 24.09
    jq            : 1.7.1

Clipboard
    wl-copy/paste: 2.2.1 / 2.2.1
    xclip        : No such file or directory (os error 2)
    xsel         : 1.2.1

Describe the bug

I have been using yazi and after 4.2 I started seeing this issue. I enter a ":" to get a blocking shell. The shell command executes but yazi doesn't block. I deleted my custom yazi config directory and the .local/state/.yazi directories and installed the latest nightly. Problem still happens. I also tried to use konsole / bahs/ no tmux instead of my usual setup and same issue.

Minimal reproducer

Hit ":" and enter ls

Anything else?

No response

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)
@pcause pcause added the bug Something isn't working label Jan 9, 2025
@sxyazi
Copy link
Owner

sxyazi commented Jan 10, 2025

I just tested it and didn't find any unusual behavior. Could you be more specific? For example, what is the behavior you're expecting, and what is the current behavior? Which version exactly is "before 0.4.2", and what was its behavior like? A video would be really helpful.

@sxyazi sxyazi added the waiting on op Waiting for more information from the original poster label Jan 10, 2025
@pcause
Copy link
Author

pcause commented Jan 10, 2025

The behavior is that the command is executed and instead of waiting for a key to be hit before returning to yazi, it immediately returns and I never see the output of the shell command . If I then hit "q" I can see the output of the command I entered.

@github-actions github-actions bot removed the waiting on op Waiting for more information from the original poster label Jan 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Jan 10, 2025

This is the expected behavior, this is how shell --block works.

If your app isn't a blocking interactive program (like vim, helix, etc.), it will return to Yazi immediately after execution.

It should always behave this way. I'm surprised you're saying that previous versions didn't work like this. Could you specify which version you're referring to?

@sxyazi sxyazi added invalid This doesn't seem right waiting on op Waiting for more information from the original poster and removed bug Something isn't working labels Jan 10, 2025
@pcause
Copy link
Author

pcause commented Jan 10, 2025

I guess I must have once set the shell block example you gave in tops and lost that in my keybindings. Sorry. It wasn't obvious going back and reading the config docs about --block that it launches the program directly and doesn't do what the tip says. Any reason you don't make the keybinding in the tip part of the default keybindings.

@pcause pcause closed this as completed Jan 10, 2025
@github-actions github-actions bot removed the waiting on op Waiting for more information from the original poster label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants