mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 01:15:14 +02:00
tweak version output as a list vs table (#472)
This commit is contained in:
@ -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())
|
||||
|
Reference in New Issue
Block a user