feat(todo): add numbered tasks, edit, done, and future filtering
Implement smoother todo editing with the following features: - Display numbered tasks [1], [2], etc. in `streamd todo` - Add `streamd todo N edit` to open editor at task line - Add `streamd todo N done` to insert @Done after @Task - Add `--show-future` flag to include future tasks (hidden by default)
This commit is contained in:
parent
a8c41ec833
commit
124a5b7e2a
5 changed files with 198 additions and 7 deletions
|
|
@ -13,13 +13,34 @@ pub struct Cli {
|
|||
pub command: Option<Commands>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum TodoAction {
|
||||
/// Edit a task by its number
|
||||
Edit {
|
||||
/// Task number to edit
|
||||
number: usize,
|
||||
},
|
||||
/// Mark a task as done
|
||||
Done {
|
||||
/// Task number to mark as done
|
||||
number: usize,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Create a new stream file
|
||||
New,
|
||||
|
||||
/// Display open tasks
|
||||
Todo,
|
||||
Todo {
|
||||
/// Show tasks with dates in the future
|
||||
#[arg(long)]
|
||||
show_future: bool,
|
||||
|
||||
#[command(subcommand)]
|
||||
action: Option<TodoAction>,
|
||||
},
|
||||
|
||||
/// Edit a stream file by position
|
||||
Edit {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue