fix: use configured labels for meta columns in list display
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -112,27 +112,6 @@ 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
|
||||
.split(',')
|
||||
.map(|col| {
|
||||
let parts: Vec<&str> = col.split(':').collect();
|
||||
let mut map = std::collections::HashMap::new();
|
||||
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 {
|
||||
parts[0].to_string()
|
||||
};
|
||||
map.insert("label".to_string(), label);
|
||||
map
|
||||
})
|
||||
.collect();
|
||||
config_builder = config_builder.set_override("list_format", columns)?;
|
||||
}
|
||||
|
||||
if args.options.human_readable {
|
||||
config_builder = config_builder.set_override("human_readable", true)?;
|
||||
|
||||
Reference in New Issue
Block a user