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

Sort directories first does not work after re-sort #830

Closed
bertradio opened this issue Mar 19, 2024 · 6 comments
Closed

Sort directories first does not work after re-sort #830

bertradio opened this issue Mar 19, 2024 · 6 comments
Labels
invalid This doesn't seem right

Comments

@bertradio
Copy link

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

kitty 0.33

Did you try the latest main branch to see if the problem got fixed?

Tried, but the problem still

yazi --debug output

Yazi yazi 0.2.4 (b10f2de 2024-03-09)

Environment
OS: linux-x86_64 (unix)
Debug: false

Emulator
Emulator.via_env: ("xterm-kitty", "")
Emulator.via_csi: Ok(Kitty)
Emulator.detect: Kitty

Adaptor
Adaptor.matches: Kitty

tmux
TMUX: false

Zellij
ZELLIJ_SESSION_NAME: None

Desktop
XDG_SESSION_TYPE: Some("x11")
WAYLAND_DISPLAY: None
DISPLAY: Some(":0")

Ueberzug
Version: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })

WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false

Describe the bug

In yazi.toml i set directories first. This works.

But if I sort within yazi using "," and then go back to an alpha or normal sort the directories sort within the files.

Expected Behavior

When I return to an alpha or normal sort the directories should be first.

To Reproduce

Start yazi with directories sorted first. Sort by something else, for example ",M". Then sort by alpha ",a". You will see the directories are no longer first

Configuration

from yazi,toml:

sort_by = "alphabetical"
sort_sensitive = false
sort_reverse = false
sort_dir_first = true

Anything else?

I just moved over from ranger and LOVE yazi. Still at the stage of configuring and learning. Still need to figure out how to preview MS Office and Open Office files. Was able to do it in ranger.

Also would like to be able to specify files or extensions to be included in hidden files as is possible with ranger. This is a nice way to hide directories.

Thanks for the great work!

@bertradio bertradio added the bug Something isn't working label Mar 19, 2024
@sxyazi
Copy link
Owner

sxyazi commented Mar 19, 2024

Hi, the sort command has a --dir-first option, you can do something like this if you want to keep the directories on the top:

sort alphabetical --dir-first

Doc of sort command: https://yazi-rs.github.io/docs/configuration/keymap/#sort

Still need to figure out how to preview MS Office and Open Office files

You can achieve this by configuring custom openers and previewers:

Also would like to be able to specify files or extensions to be included in hidden files as is possible with ranger. This is a nice way to hide directories.

There's a request about it #694

@sxyazi sxyazi closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@sxyazi sxyazi added invalid This doesn't seem right and removed bug Something isn't working labels Mar 19, 2024
@bertradio
Copy link
Author

Hi, the sort command has a --dir-first option, you can do something like this if you want to keep the directories on the top:

sort alphabetical --dir-first

Doc of sort command: https://yazi-rs.github.io/docs/configuration/keymap/#sort

Still need to figure out how to preview MS Office and Open Office files

You can achieve this by configuring custom openers and previewers:

Also would like to be able to specify files or extensions to be included in hidden files as is possible with ranger. This is a nice way to hide directories.

There's a request about it #694

Thank you so much for the prompt response. The sort option does exactly what I need. I will check out the previewer options.

@bertradio
Copy link
Author

bertradio commented Mar 19, 2024 via email

@sxyazi
Copy link
Owner

sxyazi commented Mar 19, 2024

Yeah, it's here https://yazi-rs.github.io/docs/plugins/overview#previewer

You can start by copying the json.lua file into your ~/.config/yazi/plugins/office.yazi/init.lua, then replace the jq command within it with a command that can preview MS Office file.

@bertradio
Copy link
Author

bertradio commented Mar 19, 2024 via email

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants