diff --git a/yazi-core/src/manager/commands/bulk_create.rs b/yazi-core/src/manager/commands/bulk_create.rs index 8580a3e9..d019bfff 100644 --- a/yazi-core/src/manager/commands/bulk_create.rs +++ b/yazi-core/src/manager/commands/bulk_create.rs @@ -1,18 +1,26 @@ -use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::{OsStr, OsString}, io::{BufWriter, Write, stderr}, path::PathBuf}; +use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::OsString, io::{BufWriter, Write, stderr}, path::PathBuf}; use anyhow::{Result, anyhow}; use scopeguard::defer; -use tokio::{fs, io::{AsyncReadExt, AsyncWriteExt, stdin}}; +use tokio::{fs, io::{AsyncReadExt, stdin}}; use yazi_config::{OPEN, PREVIEW}; use yazi_dds::Pubsub; -use yazi_fs::{File, FilesOp, max_common_root, maybe_exists, ok_or_not_found, paths_to_same_file, realname}; +use yazi_fs::{File, FilesOp, ok_or_not_found, realname}; use yazi_proxy::{AppProxy, HIDER, TasksProxy, WATCHER}; -use yazi_shared::{terminal_clear, url::{Url, UrnBuf}}; +use yazi_shared::{event::CmdCow, terminal_clear, url::{Url, UrnBuf}}; use crate::manager::Manager; +struct Opt { + +} + +impl From for Opt { + fn from(_c: CmdCow) -> Self { Self { } } +} impl Manager { - pub(super) fn bulk_create(&self) { + #[yazi_codegen::command] + pub fn bulk_create(&self,_opt: Opt) { let Some(opener) = OPEN.block_opener("bulk-create.txt", "text/plain") else { return AppProxy::notify_warn("Bulk create", "No text opener found"); }; diff --git a/yazi-fm/src/executor.rs b/yazi-fm/src/executor.rs index 769a4409..d6abfb5b 100644 --- a/yazi-fm/src/executor.rs +++ b/yazi-fm/src/executor.rs @@ -114,6 +114,8 @@ impl<'a> Executor<'a> { on!(MANAGER, remove, &self.app.cx.tasks); on!(MANAGER, remove_do, &self.app.cx.tasks); on!(MANAGER, create); + on!(MANAGER, bulk_create); + on!(MANAGER, rename); on!(ACTIVE, copy); on!(ACTIVE, shell);