mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
tweak version output as a list vs table (#472)
This commit is contained in:
parent
7cbeebaac1
commit
f8e6620e48
18
Cargo.lock
generated
18
Cargo.lock
generated
@ -1209,6 +1209,12 @@ version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
|
||||
|
||||
[[package]]
|
||||
name = "is_debug"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.3"
|
||||
@ -1684,6 +1690,7 @@ dependencies = [
|
||||
"serde_urlencoded",
|
||||
"serde_yaml",
|
||||
"sha2",
|
||||
"shadow-rs",
|
||||
"strip-ansi-escapes",
|
||||
"sysinfo",
|
||||
"terminal_size",
|
||||
@ -2714,6 +2721,17 @@ dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shadow-rs"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8935e920eb80ff8f5a5bced990325d12f6cc1015154a3852c6a23cf5bd71c447"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"git2",
|
||||
"is_debug",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.3.12"
|
||||
|
@ -188,31 +188,6 @@ pub fn version(
|
||||
},
|
||||
);
|
||||
|
||||
// Manually create a list of all possible plugin names
|
||||
// Don't think we need this anymore. Leaving it here, just in case we do actually need it.
|
||||
// let all_plugins = vec![
|
||||
// "fetch",
|
||||
// "inc",
|
||||
// "match",
|
||||
// "post",
|
||||
// "ps",
|
||||
// "sys",
|
||||
// "textview",
|
||||
// "binaryview",
|
||||
// "chart bar",
|
||||
// "chart line",
|
||||
// "from bson",
|
||||
// "from sqlite",
|
||||
// "query json",
|
||||
// "s3",
|
||||
// "selector",
|
||||
// "start",
|
||||
// "to bson",
|
||||
// "to sqlite",
|
||||
// "tree",
|
||||
// "xpath",
|
||||
// ];
|
||||
|
||||
// Get a list of command names and check for plugins
|
||||
let installed_plugins = engine_state
|
||||
.plugin_decls()
|
||||
@ -232,12 +207,20 @@ pub fn version(
|
||||
let cols = indexmap.keys().cloned().collect::<Vec<_>>();
|
||||
let vals = indexmap.values().cloned().collect::<Vec<_>>();
|
||||
|
||||
Ok(Value::List {
|
||||
vals: vec![Value::Record {
|
||||
cols,
|
||||
vals,
|
||||
span: Span::unknown(),
|
||||
}],
|
||||
// Ok(Value::List {
|
||||
// vals: vec![Value::Record {
|
||||
// cols,
|
||||
// vals,
|
||||
// span: Span::unknown(),
|
||||
// }],
|
||||
// span: Span::unknown(),
|
||||
// }
|
||||
// .into_pipeline_data())
|
||||
|
||||
// List looks better than table, imo
|
||||
Ok(Value::Record {
|
||||
cols,
|
||||
vals,
|
||||
span: Span::unknown(),
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
Loading…
Reference in New Issue
Block a user