sxyazi / yazi

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

Lua API: `tab::Selected` keeps the order of file selections #1719

Open AnirudhG07 opened 2 weeks ago

AnirudhG07 commented 2 weeks ago

yazi --debug output

Yazi
    Version: 0.3.3 (e6912da 2024-09-29)
    Debug  : false
    OS     : linux-x86_64 (unix)

Ya
    Version: 0.3.3 (e6912da 2024-09-29)

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(WezTerm)
    Emulator.detect : WezTerm

Adapter
    Adapter.matches: Iip

Desktop
    XDG_SESSION_TYPE           : Some("x11")
    WAYLAND_DISPLAY            : None
    DISPLAY                    : Some(":1")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/bin/bash")
    EDITOR             : Some("nvim")
    VISUAL             : Some("nvim")
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : 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 })

Multiplexers
    TMUX               : false
    tmux version       : 3.4
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file             : 5.41
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: 2.2.2
    magick           : 7.1.1-36
    fzf              : 0.55.0
    fd               : 10.1.0
    rg               : 14.1.0
    chafa            : 
    zoxide           : 0.9.4
    7z               : 17.05
    7zz              : No such file or directory (os error 2)
    jq               : 1.7.1

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/home/anirudhgupta/.local/state/yazi" directory.

Please describe the problem you're trying to solve

Currently when you select multiple files, the order of selected file is random. It would be nice to have it ordered.

Would you be willing to contribute this feature?

Describe the solution you'd like

I select files, and they get appended in whatever data str you ll use, in order so that while copying contents from it, or renaming it. It comes in the order you select the files.

Additional context

No response

Validations

ionnux commented 1 week ago

I need this too.