refactor: rename command plugin to exec

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-27 22:01:47 -03:00
parent e374e2d99b
commit 15baa8f297
2 changed files with 20 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
use log::debug;
use serde::{Deserialize, Serialize};
pub mod command;
pub mod exec;
pub mod digest;
pub mod magic;
pub mod binary;
@@ -15,7 +15,7 @@ pub mod shell;
pub mod shell_pid;
pub mod keep_pid;
use crate::meta_plugin::command::MetaPluginCommand;
use crate::meta_plugin::exec::MetaPluginExec;
use crate::meta_plugin::digest::DigestMetaPlugin;
use crate::meta_plugin::read_time::ReadTimeMetaPlugin;
use crate::meta_plugin::read_rate::ReadRateMetaPlugin;
@@ -133,7 +133,7 @@ pub enum MetaPluginType {
ReadTime,
ReadRate,
Hostname,
Command,
Exec,
}
/// Central function to handle metadata output with name mapping
@@ -291,11 +291,11 @@ pub fn get_meta_plugin(
MetaPluginType::ReadTime => Box::new(ReadTimeMetaPlugin::new(options, outputs)),
MetaPluginType::ReadRate => Box::new(ReadRateMetaPlugin::new(options, outputs)),
MetaPluginType::Hostname => Box::new(HostnameMetaPlugin::new(options, outputs)),
MetaPluginType::Command => {
// For command type, we need to parse the command from options
MetaPluginType::Exec => {
// For exec type, we need to parse the command from options
let mut program_name = String::new();
let mut args = Vec::new();
let mut meta_name = MetaPluginType::Command.to_string();
let mut meta_name = MetaPluginType::Exec.to_string();
let mut split_whitespace = true;
if let Some(opts) = &options {
@@ -321,12 +321,12 @@ pub fn get_meta_plugin(
}
}
Box::new(MetaPluginCommand::new(&program_name,
args.iter().map(|s| s.as_str()).collect(),
meta_name,
split_whitespace,
options,
outputs))
Box::new(MetaPluginExec::new(&program_name,
args.iter().map(|s| s.as_str()).collect(),
meta_name,
split_whitespace,
options,
outputs))
}
}
}