Crates.io | todo_cli_jfc |
lib.rs | todo_cli_jfc |
version | 0.1.4 |
source | src |
created_at | 2023-12-29 14:21:02.724774 |
updated_at | 2024-01-20 11:40:32.20349 |
description | A very simple cli tool to manage todos |
homepage | |
repository | |
max_upload_size | |
id | 1083381 |
size | 26,145 |
This is a very basic todo cli tool, mainly written to learn rust.
These are the basic commands as of version 0.1.4
#[derive(Debug, Parser)]
#[command(name = "todo")]
#[command(author, version)]
#[command(about = "A simple todo cli tool.", long_about = None)]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
enum Commands {
#[command(about = "add a new todo to your database")]
Add {
#[arg(value_name = "description", long, short)]
description: String,
},
#[command(about = "toggle a todo done or undone with this")]
Toggle {
#[arg(value_name = "todo nr", long, short)]
number: i64,
},
#[command(about = "sweep away all todos that are done")]
Sweep {},
#[command(about = "remove a todo from your database")]
Remove {
#[arg(value_name = "todo nr")]
number: i64,
},
#[command(about = "show all your todos saved to the database")]
Show {},
}
Added a sweep command that removes all todos marked done.