Skip to content

Add multiple files in a single prompt #1974

@vivianludrick

Description

@vivianludrick

yazi --debug output

Yazi
    Version: 0.3.3 (Arch Linux 2024-09-05)
    Debug  : false
    OS     : linux-x86_64 (unix)

Ya
    Version: 0.3.3 (Arch Linux 2024-09-05)

Emulator
    Emulator.via_env: ("alacritty", "tmux")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect : Unknown([])

Adapter
    Adapter.matches: Wayland

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

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/usr/bin/zsh")
    EDITOR             : Some("nvim")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "nvim", for_: None, spread: true })
    block  : Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "nvim", for_: None, spread: true })

Multiplexers
    TMUX               : true
    tmux version       : tmux 3.5a
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file             : 5.45
    ueberzugpp       : 2.9.6
    ffmpegthumbnailer: No such file or directory (os error 2)
    magick           : 7.1.1-41
    fzf              : 0.56.3
    fd               : 10.2.0
    rg               : 14.1.1
    chafa            : 1.14.2
    zoxide           : 0.9.6
    7z               : No such file or directory (os error 2)
    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/shadow/.local/state/yazi" directory.

Please describe the problem you're trying to solve

I don't know if it is implemented yet(read the entire docs but still couldn't find it) but is it possible to create multiple files/folder in a single yazi prompt. I want a feature like the mkdir and touch command have.

For e.g:
touch one.txt two.txt : This will create two file- one.txt and two.txt
mkdir -p root/{one,two}: This will create two folders- root/one and root/two

I want to have the similar functionality in the yazi prompt that opens after pressing a key.

If this is feature is implemented would you mind sharing the syntax

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

What I want is:

  • Open the create file prompt by pressing the a key
  • For the input {one,two}/{file.txt,file.yaml} three/ should make the following tree structure of the directories
.
├── one
│   ├── file.txt
│   └── file.yaml
└── two
│   ├── file.txt
│   └── file.yaml
└── three

the syntax can be anything as long as it does the job

Additional context

No response

Validations

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions