sxyazi / yazi

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

Can't edit directory using `micro` editor #1424

Closed ManuLinares closed 1 month ago

ManuLinares commented 1 month ago

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

alacritty 0.13.2

yazi --debug output

```sh ##### ↓↓↓ Paste the output here: ↓↓↓ ##### Yazi Version: 0.3.0 (Arch Linux 2024-08-06) Debug : false OS : linux-x86_64 (unix) Ya Version: 0.3.0 Emulator Emulator.via_env: ("alacritty", "tmux") Emulator.via_csi: Ok(Unknown([])) Emulator.detect : Unknown([]) Adapter Adapter.matches: X11 Desktop XDG_SESSION_TYPE: Some("x11") WAYLAND_DISPLAY : None DISPLAY : Some(":0.0") SSH shared.in_ssh_connection: false WSL /proc/sys/fs/binfmt_misc/WSLInterop: false Variables SHELL : Some("/bin/bash") EDITOR : Some("/usr/bin/micro") YAZI_FILE_ONE : None YAZI_CONFIG_HOME : None ZELLIJ_SESSION_NAME: None 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 : true Version: 3.4 Dependencies file : 5.45 ueberzugpp : 2.9.6 ffmpegthumbnailer: 2.2.2 magick : 7.1.1-36 fzf : 0.54.3 fd : 10.1.0 rg : 14.1.0 chafa : 1.14.1 zoxide : No such file or directory (os error 2) 7z : 17.05 7zz : No such file or directory (os error 2) jq : 1.7.1 ```

Did you try the latest nightly build to see if the problem got fixed?

Yes, and I updated the debug information above (yazi --debug) to the nightly that I tried

Describe the bug

https://yazi-rs.github.io/docs/tips/#smart-enter-enter-for-directory-open-for-file

Trying to open a directory via ENTER gives Error: /home/user/directory is a directory and cannot be opened

Adding the plugin listed in Tips gives the same behaviour.

Minimal reproducer

  1. Open yazi
  2. hover a directory and press 'enter'.

Anything else?

I expected one of the following.

sxyazi commented 1 month ago

micro doesn't support opening directories.

screenshot-001941

You need to switch to a different directory opener. See https://yazi-rs.github.io/docs/configuration/yazi/#open

ManuLinares commented 1 month ago

You need to switch to a different directory opener. See https://yazi-rs.github.io/docs/configuration/yazi/#open

Docs aren't very clear. May I ask you how can I achieve that?

Pressing enter on a directory should exit yazi and 'cd' intyo the dir.

sxyazi commented 1 month ago

Pressing enter on a directory should exit yazi and 'cd' intyo the dir

I'm a bit confused. If you want to exit Yazi, you need to use the quit command, not the open command. The open command is for opening files within or outside of Yazi, not for exiting Yazi.

ManuLinares commented 1 month ago

Pressing enter on a directory should exit yazi and 'cd' intyo the dir

I'm a bit confused. If you want to exit Yazi, you need to use the quit command, not the open command. The open command is for opening files within or outside of Yazi, not for exiting Yazi.

What I'm trying to achieve: When pressing 'enter' on a directory, yazi must exit and 'cd' into that directory.

I have no idea how to get this behavior.

github-actions[bot] commented 1 week 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.