diff --git a/src/modes/status.rs b/src/modes/status.rs index 92bc153..6f3f43e 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -133,19 +133,20 @@ fn build_meta_plugin_table(enabled_meta_plugins: &Vec) -> Table let is_enabled = enabled_meta_plugins.contains(&meta_plugin_type); // Determine what implementation will actually be used - let (binary_display, args_display) = 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 if supported, otherwise show as not found - _ => { - // For program-based plugins, we need to check if they're supported - if is_supported { + 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 the program info by downcasting to MetaPluginProgram // This is a bit hacky but necessary to get the program info let program_name = match meta_plugin_type { @@ -169,8 +170,6 @@ fn build_meta_plugin_table(enabled_meta_plugins: &Vec) -> Table }; (program_name, args.to_string()) - } else { - ("".to_string(), "".to_string()) } } }; @@ -187,6 +186,7 @@ fn build_meta_plugin_table(enabled_meta_plugins: &Vec) -> Table }, match binary_display.as_str() { "" => Cell::new(&binary_display).with_style(Attr::ForegroundColor(color::BRIGHT_BLACK)), + "" => Cell::new(&binary_display).with_style(Attr::ForegroundColor(color::RED)), _ => Cell::new(&binary_display), }, Cell::new(&args_display),