forked from janek/mostr
feat(main): allow creating multiple task at once with newlines
This commit is contained in:
parent
58126ba6e7
commit
75a5f27843
|
@ -92,7 +92,9 @@ To stop time-tracking completely, simply move to the root of all tasks.
|
||||||
|
|
||||||
`TASK` creation syntax: `NAME: TAG1 TAG2 ...`
|
`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
|
- `.` - clear filters
|
||||||
- `.TASK`
|
- `.TASK`
|
||||||
+ activate task by id
|
+ activate task by id
|
||||||
|
|
|
@ -662,6 +662,12 @@ async fn main() -> Result<()> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
|
} else if input.contains('\n') {
|
||||||
|
input.split('\n').for_each(|line| {
|
||||||
|
if !line.trim().is_empty() {
|
||||||
|
tasks.make_task(line);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
tasks.filter_or_create(tasks.get_position().as_ref(), &input);
|
tasks.filter_or_create(tasks.get_position().as_ref(), &input);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue