diff --git a/src/meta_plugin/hostname.rs b/src/meta_plugin/hostname.rs index 290a562..bdd9a1a 100644 --- a/src/meta_plugin/hostname.rs +++ b/src/meta_plugin/hostname.rs @@ -23,6 +23,18 @@ impl HostnameMetaPlugin { // Override with provided options if let Some(opts) = options { for (key, value) in opts { + // Handle "false" string values by converting them to Bool(false) + if key == "hostname" || key == "hostname_full" || key == "hostname_short" { + if let serde_yaml::Value::String(s) = &value { + if s == "false" { + final_options.insert(key, serde_yaml::Value::Bool(false)); + continue; + } else if s == "true" { + final_options.insert(key, serde_yaml::Value::Bool(true)); + continue; + } + } + } final_options.insert(key, value); } } @@ -195,6 +207,9 @@ impl MetaPlugin for HostnameMetaPlugin { _ => true, }; + // Ensure that if hostname is explicitly set to false, it's disabled + // This handles cases where it might be set to "false" string which we converted above + let hostname_full_enabled = self.options.get("hostname_full") .and_then(|v| v.as_bool()) .unwrap_or(true); diff --git a/src/modes/status.rs b/src/modes/status.rs index c21e201..52ab4a2 100644 --- a/src/modes/status.rs +++ b/src/modes/status.rs @@ -196,7 +196,8 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option