mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 12:17:19 +02:00
Merge pull request #215 from kdheepak/add-taskwarrior-tui-specific-filter
Add taskwarrior-tui specific filter
This commit is contained in:
commit
b4b8c352e4
2 changed files with 10 additions and 2 deletions
|
@ -20,6 +20,7 @@ uda.taskwarrior-tui.task-report.looping=true
|
||||||
uda.taskwarrior-tui.task-report.jump-on-task-add=true
|
uda.taskwarrior-tui.task-report.jump-on-task-add=true
|
||||||
uda.taskwarrior-tui.style.context.active=black on rgb444
|
uda.taskwarrior-tui.style.context.active=black on rgb444
|
||||||
uda.taskwarrior-tui.style.calendar.title=black on rgb444
|
uda.taskwarrior-tui.style.calendar.title=black on rgb444
|
||||||
|
uda.taskwarrior-tui.task-report.next.filter=$(task show report.next.filter)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configure user defined shortcuts:
|
## Configure user defined shortcuts:
|
||||||
|
|
|
@ -346,9 +346,16 @@ impl Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_filter(data: &str, report: &str) -> Result<String> {
|
fn get_filter(data: &str, report: &str) -> Result<String> {
|
||||||
|
if let Some(s) = Self::get_config(
|
||||||
|
format!("uda.taskwarrior-tui.task-report.{}.filter", report).as_str(),
|
||||||
|
data,
|
||||||
|
) {
|
||||||
|
Ok(s)
|
||||||
|
} else {
|
||||||
Self::get_config(format!("report.{}.filter", report).as_str(), data)
|
Self::get_config(format!("report.{}.filter", report).as_str(), data)
|
||||||
.context(format!("Unable to parse `task show report.{}.filter`.", report))
|
.context(format!("Unable to parse `task show report.{}.filter`.", report))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn get_data_location(data: &str) -> String {
|
fn get_data_location(data: &str) -> String {
|
||||||
Self::get_config("data.location", data)
|
Self::get_config("data.location", data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue