mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
a try
This commit is contained in:
parent
a2ea22a5f2
commit
275678912b
2 changed files with 15 additions and 5 deletions
|
|
@ -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<CmdCow> 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");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue