fix: Use trim_fmt() before trim_end() for comfy-table output
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -125,7 +125,7 @@ fn show_item(
|
||||
]);
|
||||
}
|
||||
|
||||
println!("{}", table.trim_end());
|
||||
println!("{}", table.trim_fmt().trim_end());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ pub fn mode_list(
|
||||
table.add_row(table_row);
|
||||
}
|
||||
|
||||
println!("{}", table.trim_end());
|
||||
println!("{}", table.trim_fmt().trim_end());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -209,17 +209,19 @@ pub fn mode_status(
|
||||
match output_format {
|
||||
OutputFormat::Table => {
|
||||
println!("CONFIG:");
|
||||
println!("{}", build_config_table(settings).trim_end());
|
||||
let config_table = build_config_table(settings);
|
||||
println!("{}", config_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
|
||||
println!("PATHS:");
|
||||
println!("{}", build_path_table(&status_info.paths).trim_end());
|
||||
let path_table = build_path_table(&status_info.paths);
|
||||
println!("{}", path_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
|
||||
// Always try to print META PLUGINS CONFIGURED section using status_info
|
||||
if let Some(meta_plugins_table) = build_meta_plugins_configured_table(&status_info) {
|
||||
println!("META PLUGINS CONFIGURED:");
|
||||
println!("{}", meta_plugins_table.trim_end());
|
||||
println!("{}", meta_plugins_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
} else {
|
||||
println!("META PLUGINS CONFIGURED:");
|
||||
|
||||
@@ -261,15 +261,18 @@ pub fn mode_status_plugins(
|
||||
OutputFormat::Table => {
|
||||
println!("META PLUGINS:");
|
||||
println!("META PLUGINS:");
|
||||
println!("{}", build_meta_plugin_table(&status_info.meta_plugins).trim_end());
|
||||
let meta_table = build_meta_plugin_table(&status_info.meta_plugins);
|
||||
println!("{}", meta_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
|
||||
println!("COMPRESSION PLUGINS:");
|
||||
println!("{}", build_compression_table(&status_info.compression).trim_end());
|
||||
let compression_table = build_compression_table(&status_info.compression);
|
||||
println!("{}", compression_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
|
||||
println!("FILTER PLUGINS:");
|
||||
println!("{}", build_filter_plugin_table(&status_info.filter_plugins).trim_end());
|
||||
let filter_table = build_filter_plugin_table(&status_info.filter_plugins);
|
||||
println!("{}", filter_table.trim_fmt().trim_end());
|
||||
println!();
|
||||
Ok(())
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user