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:
@@ -112,6 +112,8 @@ impl Settings {
|
|||||||
config_builder = config_builder.set_override("dir", dir.to_str().unwrap())?;
|
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" {
|
if args.options.list_format != "id,time,size,tags,meta:hostname" {
|
||||||
// Convert the string format to the new list format structure
|
// Convert the string format to the new list format structure
|
||||||
let columns: Vec<std::collections::HashMap<String, String>> = args.options.list_format
|
let columns: Vec<std::collections::HashMap<String, String>> = args.options.list_format
|
||||||
@@ -119,7 +121,7 @@ impl Settings {
|
|||||||
.map(|col| {
|
.map(|col| {
|
||||||
let parts: Vec<&str> = col.split(':').collect();
|
let parts: Vec<&str> = col.split(':').collect();
|
||||||
let mut map = std::collections::HashMap::new();
|
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 {
|
let label = if parts.len() > 1 {
|
||||||
parts[1].to_string()
|
parts[1].to_string()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user