diff --git a/src/modes/server.rs b/src/modes/server.rs index bd33447..a9928a3 100644 --- a/src/modes/server.rs +++ b/src/modes/server.rs @@ -274,20 +274,13 @@ async fn handle_status( let (binary_display, args_display) = if !is_supported { ("".to_string(), "".to_string()) } else { - match meta_plugin_type { - MetaPluginType::DigestSha256 | MetaPluginType::ReadTime | MetaPluginType::ReadRate | - MetaPluginType::Cwd | MetaPluginType::Uid | MetaPluginType::User | - MetaPluginType::Gid | MetaPluginType::Group | MetaPluginType::Shell | - MetaPluginType::ShellPid | MetaPluginType::KeepPid | MetaPluginType::Hostname | - MetaPluginType::FullHostname => { - ("".to_string(), "".to_string()) - }, - _ => { - if let Some((program, args)) = meta_plugin.program_info() { - (program.to_string(), args.join(" ")) - } else { - ("".to_string(), "".to_string()) - } + if meta_plugin.is_internal() { + ("".to_string(), "".to_string()) + } else { + if let Some((program, args)) = meta_plugin.program_info() { + (program.to_string(), args.join(" ")) + } else { + ("".to_string(), "".to_string()) } } }; diff --git a/src/modes/status.rs b/src/modes/status.rs index 444a236..d96a9aa 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -145,23 +145,14 @@ fn build_meta_plugin_table(enabled_meta_plugins: &Vec) -> Table let (binary_display, args_display) = if !is_supported { ("".to_string(), "".to_string()) } else { - match meta_plugin_type { - // For internal plugins, always show as internal - MetaPluginType::DigestSha256 | MetaPluginType::ReadTime | MetaPluginType::ReadRate | - MetaPluginType::Cwd | MetaPluginType::Uid | MetaPluginType::User | - MetaPluginType::Gid | MetaPluginType::Group | MetaPluginType::Shell | - MetaPluginType::ShellPid | MetaPluginType::KeepPid | MetaPluginType::Hostname | - MetaPluginType::FullHostname => { - ("".to_string(), "".to_string()) - }, - // For program-based plugins, show program info - _ => { - // Get program info from the meta plugin itself - if let Some((program, args)) = meta_plugin.program_info() { - (program.to_string(), args.join(" ")) - } else { - ("".to_string(), "".to_string()) - } + if meta_plugin.is_internal() { + ("".to_string(), "".to_string()) + } else { + // Get program info from the meta plugin itself + if let Some((program, args)) = meta_plugin.program_info() { + (program.to_string(), args.join(" ")) + } else { + ("".to_string(), "".to_string()) } } }; @@ -248,20 +239,13 @@ fn show_status_structured( let (binary_display, args_display) = if !is_supported { ("".to_string(), "".to_string()) } else { - match meta_plugin_type { - MetaPluginType::DigestSha256 | MetaPluginType::ReadTime | MetaPluginType::ReadRate | - MetaPluginType::Cwd | MetaPluginType::Uid | MetaPluginType::User | - MetaPluginType::Gid | MetaPluginType::Group | MetaPluginType::Shell | - MetaPluginType::ShellPid | MetaPluginType::KeepPid | MetaPluginType::Hostname | - MetaPluginType::FullHostname => { - ("".to_string(), "".to_string()) - }, - _ => { - if let Some((program, args)) = meta_plugin.program_info() { - (program.to_string(), args.join(" ")) - } else { - ("".to_string(), "".to_string()) - } + if meta_plugin.is_internal() { + ("".to_string(), "".to_string()) + } else { + if let Some((program, args)) = meta_plugin.program_info() { + (program.to_string(), args.join(" ")) + } else { + ("".to_string(), "".to_string()) } } };