mirror of
https://github.com/nushell/nushell
synced 2024-11-10 23:24:14 +00:00
Fix plurals in abbrevations (#409)
This commit is contained in:
parent
19766556f3
commit
d9bedaae2f
1 changed files with 10 additions and 2 deletions
|
@ -345,8 +345,16 @@ impl Value {
|
|||
)
|
||||
}
|
||||
Value::String { val, .. } => val,
|
||||
Value::List { vals: val, .. } => format!("[list {} items]", val.len()),
|
||||
Value::Record { cols, .. } => format!("{{record {} fields}}", cols.len()),
|
||||
Value::List { vals: val, .. } => format!(
|
||||
"[list {} item{}]",
|
||||
val.len(),
|
||||
if val.len() == 1 { "" } else { "s" }
|
||||
),
|
||||
Value::Record { cols, .. } => format!(
|
||||
"{{record {} field{}}}",
|
||||
cols.len(),
|
||||
if cols.len() == 1 { "" } else { "s" }
|
||||
),
|
||||
Value::Block { val, .. } => format!("<Block {}>", val),
|
||||
Value::Nothing { .. } => String::new(),
|
||||
Value::Error { error } => format!("{:?}", error),
|
||||
|
|
Loading…
Reference in a new issue