tweak version output as a list vs table (#472)

This commit is contained in:
Darren Schroeder
2021-12-11 14:40:16 -06:00
committed by GitHub
parent 7cbeebaac1
commit f8e6620e48
2 changed files with 32 additions and 31 deletions

View File

@ -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())