mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-24 14:36:42 +02:00
feat: Support default empty filter
This commit is contained in:
parent
1e47235896
commit
d481299355
1 changed files with 6 additions and 3 deletions
|
@ -92,7 +92,11 @@ impl Config {
|
|||
|
||||
let color = Self::get_color_collection(data);
|
||||
let filter = Self::get_filter(data, report)?;
|
||||
let filter = format!("{} ", filter);
|
||||
let filter = if filter.trim_start().trim_end().is_empty() {
|
||||
filter
|
||||
} else {
|
||||
format!("{} ", filter)
|
||||
};
|
||||
let data_location = Self::get_data_location(data);
|
||||
let due = Self::get_due(data);
|
||||
let rule_precedence_color = Self::get_rule_precedence_color(data);
|
||||
|
@ -439,8 +443,7 @@ impl Config {
|
|||
) {
|
||||
Ok(s)
|
||||
} else {
|
||||
Self::get_config(format!("report.{}.filter", report).as_str(), data)
|
||||
.context(format!("Unable to parse `task show report.{}.filter`.", report))
|
||||
Ok(Self::get_config(format!("report.{}.filter", report).as_str(), data).unwrap_or_default())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue