mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 15:11:52 +02:00
display boolean config options as true/false instead of Yes/No (#3043)
This commit is contained in:
@ -251,12 +251,12 @@ impl PrettyDebug for FormatInlineShape {
|
||||
InlineShape::GlobPattern(pattern) => DbgDocBldr::primitive(pattern),
|
||||
InlineShape::Boolean(boolean) => DbgDocBldr::primitive(
|
||||
match (boolean, column) {
|
||||
(true, None) => "Yes",
|
||||
(false, None) => "No",
|
||||
(true, None) => "true",
|
||||
(false, None) => "false",
|
||||
(true, Some(Column::String(s))) if !s.is_empty() => s,
|
||||
(false, Some(Column::String(s))) if !s.is_empty() => "",
|
||||
(true, Some(_)) => "Yes",
|
||||
(false, Some(_)) => "No",
|
||||
(true, Some(_)) => "true",
|
||||
(false, Some(_)) => "false",
|
||||
}
|
||||
.to_owned(),
|
||||
),
|
||||
|
@ -314,12 +314,12 @@ pub fn format_primitive(primitive: &Primitive, field_name: Option<&String>) -> S
|
||||
f
|
||||
}
|
||||
Primitive::Boolean(b) => match (b, field_name) {
|
||||
(true, None) => "Yes",
|
||||
(false, None) => "No",
|
||||
(true, None) => "true",
|
||||
(false, None) => "false",
|
||||
(true, Some(s)) if !s.is_empty() => s,
|
||||
(false, Some(s)) if !s.is_empty() => "",
|
||||
(true, Some(_)) => "Yes",
|
||||
(false, Some(_)) => "No",
|
||||
(true, Some(_)) => "true",
|
||||
(false, Some(_)) => "false",
|
||||
}
|
||||
.to_owned(),
|
||||
Primitive::Binary(_) => "<binary>".to_owned(),
|
||||
|
Reference in New Issue
Block a user