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

Add multiple files in a single prompt #1974

Open
2 of 3 tasks
vivalchemy opened this issue Nov 30, 2024 · 1 comment
Open
2 of 3 tasks

Add multiple files in a single prompt #1974

vivalchemy opened this issue Nov 30, 2024 · 1 comment
Labels
feature New feature request

Comments

@vivalchemy
Copy link

vivalchemy commented Nov 30, 2024

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
@vivalchemy vivalchemy added the feature New feature request label Nov 30, 2024
@sxyazi
Copy link
Owner

sxyazi commented Nov 30, 2024

I plan to add a "bulk-creation" feature and have reserved a key A for it — pressing A will open the user's configured editor, where they can edit a list of filenames.

After saving the file, Yazi will automatically create those files, similar to how the bulk rename (r key) works.

Just haven't had the time to implement it yet — it's not a high priority, and it can already be achieved through plugin APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants