feat(main): allow creating multiple task at once with newlines

This commit is contained in:
xeruf 2024-08-24 21:01:07 +03:00
parent 58126ba6e7
commit 75a5f27843
2 changed files with 9 additions and 1 deletions

View File

@ -92,7 +92,9 @@ To stop time-tracking completely, simply move to the root of all tasks.
`TASK` creation syntax: `NAME: TAG1 TAG2 ...`
- `TASK` - create task (prefix with space if you want a task to start with a command character)
- `TASK` - create task
+ prefix with space if you want a task to start with a command character
+ copy in text with newlines to create one task per line
- `.` - clear filters
- `.TASK`
+ activate task by id

View File

@ -662,6 +662,12 @@ async fn main() -> Result<()> {
}
});
continue;
} else if input.contains('\n') {
input.split('\n').for_each(|line| {
if !line.trim().is_empty() {
tasks.make_task(line);
}
});
} else {
tasks.filter_or_create(tasks.get_position().as_ref(), &input);
}