fix: fix handling of meta:* columns and labels

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-16 13:09:49 -03:00
parent 15e2103f66
commit 5897f89a76

View File

@@ -112,6 +112,8 @@ impl Settings {
config_builder = config_builder.set_override("dir", dir.to_str().unwrap())?;
}
// Only override list_format if it was explicitly provided via CLI args
// (not equal to the default value)
if args.options.list_format != "id,time,size,tags,meta:hostname" {
// Convert the string format to the new list format structure
let columns: Vec<std::collections::HashMap<String, String>> = args.options.list_format
@@ -119,7 +121,7 @@ impl Settings {
.map(|col| {
let parts: Vec<&str> = col.split(':').collect();
let mut map = std::collections::HashMap::new();
map.insert("name".to_string(), parts[0].to_string());
map.insert("name".to_string(), col.to_string()); // Use full column spec as name
let label = if parts.len() > 1 {
parts[1].to_string()
} else {