sxyazi / yazi

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

Yazi not exiting to current directory if zoxide is initialized in the current shell #1222

Closed amrit3128 closed 4 days ago

amrit3128 commented 4 days ago

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

kitty/foot

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

Tried, but the problem still

yazi --debug output

```sh Yazi Version: 0.2.5 (Arch Linux 2024-04-27) OS: linux-x86_64 (unix) Debug: false Emulator Emulator.via_env: ("foot", "") Emulator.via_csi: Ok(Foot) Emulator.detect: Foot Adaptor Adaptor.matches: Sixel Desktop XDG_SESSION_TYPE: Some("wayland") WAYLAND_DISPLAY: Some("wayland-1") DISPLAY: Some(":0") SSH shared.in_ssh_connection: false WSL /proc/sys/fs/binfmt_misc/WSLInterop: false Variables SHELL: Some("/usr/bin/zsh") EDITOR: Some("/usr/bin/nvim") 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:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) block: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) tmux TMUX: false Ueberzug++ Version: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" }) ```

Describe the bug

yazi does not exit into the current directory if zoxide is enabled in the shell

Expected Behavior

yazi should always exit to currently opened directory

To Reproduce

Configuration

No response

Anything else?

No response

sxyazi commented 4 days ago

Duplicate of https://github.com/sxyazi/yazi/issues/978

This is because you renamed zoxide to cd, but zoxide behaves differently from cd. It doesn't support the -- option that cd does.

A workaround is to remove the -- until the zoxide devs support it, but this might pose a security risk.