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

cd --interactive does not update CWD and completions get stuck relative to original working directory #2024

Closed
1 of 3 tasks
macydnah opened this issue Dec 10, 2024 · 2 comments · Fixed by #2025
Closed
1 of 3 tasks
Labels
bug Something isn't working

Comments

@macydnah
Copy link

macydnah commented Dec 10, 2024

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

foot v1.19.0

yazi --debug output

Yazi
    Version: 0.4.1 (Arch Linux 2024-12-10)
    Debug  : false
    Triple : x86_64-unknown-linux-gnu (linux-x86_64)
    Rustc  : 1.83.0 (90b35a62 2024-11-26)

Ya
    Version: 0.4.1 (Arch Linux 2024-12-10)

Emulator
    Brand.from_env      : Some(Foot)
    Emulator.detect     : Emulator { kind: Left(Foot), light: false, cell_size: Some((8, 16)) }
    Emulator.detect_full: Ok(Emulator { kind: Left(Foot), light: false, cell_size: Some((8, 16)) })

Adapter
    Adapter.matches: Sixel

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

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

NVIM
    NVIM          : false
    Neovim version: No such file or directory (os error 2)

Variables
    SHELL           : Some("/bin/bash")
    EDITOR          : Some("vim")
    VISUAL          : None
    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: "Edit", for_: None, spread: true })
    block-create: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "Edit", for_: None, spread: true })
    block-rename: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "Edit", for_: None, spread: true })

Multiplexers
    TMUX               : 0
    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.46
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : 24.11.0
    magick        : 7.1.1-41
    fzf           : No such file or directory (os error 2)
    fd/fdfind     : No such file or directory (os error 2) / No such file or directory (os error 2)
    rg            : No such file or directory (os error 2)
    chafa         : No such file or directory (os error 2)
    zoxide        : No such file or directory (os error 2)
    7z/7zz        : 17.05 / No such file or directory (os error 2)
    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

Regression.

This started to happen after v0.4.0

The cd --interactive command does not suggests the correct completions as it seems is stuck on the working directory yazi was originally executed.

Minimal reproducer

  • Add a keymap to execute cd --interactive command, e.g.
[manager]
keymap = [
    { on = ["c","d"], run = "cd --interactive", desc = "Go to a directory interactively" },
]
  • cd to a dir, e.g. ~/.config
  • Try to cd to a subdir, e.g. yazi config folder
  • The correct completion is not there but if you Enter, cd --interactive is correctly executed

Anything else?

yazi-cd-regression.compressed.mp4

Note

At your left: v0.3.3 At your right: v0.4.1

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)
@sxyazi
Copy link
Owner

sxyazi commented Dec 11, 2024

Please try #2025

@macydnah
Copy link
Author

It's fixed 👍 Thank you!

yazi-61cab0f.compressed.mp4

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.

2 participants