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
11
src/main.rs
11
src/main.rs
|
|
@ -1,12 +1,19 @@
|
|||
use clap::Parser;
|
||||
use streamd::cli::{Cli, Commands};
|
||||
use streamd::cli::{Cli, Commands, TodoAction};
|
||||
|
||||
fn main() -> miette::Result<()> {
|
||||
let cli = Cli::parse();
|
||||
|
||||
match cli.command {
|
||||
Some(Commands::New) => streamd::cli::commands::new::run()?,
|
||||
Some(Commands::Todo) => streamd::cli::commands::todo::run()?,
|
||||
Some(Commands::Todo {
|
||||
show_future,
|
||||
action,
|
||||
}) => match action {
|
||||
None => streamd::cli::commands::todo::run_list(show_future)?,
|
||||
Some(TodoAction::Edit { number }) => streamd::cli::commands::todo::run_edit(number)?,
|
||||
Some(TodoAction::Done { number }) => streamd::cli::commands::todo::run_done(number)?,
|
||||
},
|
||||
Some(Commands::Edit { number }) => streamd::cli::commands::edit::run(number)?,
|
||||
Some(Commands::Timesheet) => streamd::cli::commands::timesheet::run()?,
|
||||
Some(Commands::Completions { shell }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue