feat: add command for quickly creating an item
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -6,6 +6,7 @@ pub enum Commands {
|
||||
WriteQuit,
|
||||
Archive,
|
||||
CreateSection { name: String },
|
||||
CreateItem { name: String },
|
||||
Edit,
|
||||
|
||||
ShowAll,
|
||||
@@ -40,6 +41,9 @@ impl CommandParser {
|
||||
"cs" | "create-section" => rest.first().map(|name| Commands::CreateSection {
|
||||
name: name.to_string(),
|
||||
}),
|
||||
"ci" | "create-item" => Some(Commands::CreateItem {
|
||||
name: rest.join(" ").to_string(),
|
||||
}),
|
||||
"e" | "edit" => Some(Commands::Edit),
|
||||
"show-all" => Some(Commands::ShowAll),
|
||||
"hide-done" => Some(Commands::HideDone),
|
||||
|
Reference in New Issue
Block a user