pub enum TaskCommands {
Add {
name: String,
parent: Option<i64>,
spec_stdin: bool,
},
Get {
id: i64,
with_events: bool,
},
Update {
id: i64,
name: Option<String>,
parent: Option<i64>,
status: Option<String>,
complexity: Option<i32>,
priority: Option<i32>,
spec_stdin: bool,
},
Del {
id: i64,
},
Find {
status: Option<String>,
parent: Option<String>,
},
Start {
id: i64,
with_events: bool,
},
Done,
PickNext {
format: String,
},
SpawnSubtask {
name: String,
spec_stdin: bool,
},
Switch {
id: i64,
},
Search {
query: String,
},
}Variants§
Add
Add a new task
Fields
Get
Get a task by ID
Update
Update a task
Fields
Del
Delete a task
Find
Find tasks with filters
Fields
Start
Start a task (atomic: update status + set current)
Done
Complete the current focused task (atomic: check children + update status + clear current) This command only operates on the current_task_id. It will:
-
Check all subtasks are done
-
Update the task status to done
-
Clear the current_task_id
Prerequisites: A task must be set as current (via
current --set <ID>)
PickNext
Intelligently recommend the next task to work on
This command uses a context-aware priority model to recommend a single task:
- First priority: Subtasks of the current focused task (depth-first)
- Second priority: Top-level tasks (breadth-first)
The command is non-interactive and does not modify task status.
SpawnSubtask
Create a subtask under current task and switch to it
Switch
Switch to a specific task (atomic: update to doing + set current)
Search
Search tasks by content using full-text search
Trait Implementations§
Source§impl FromArgMatches for TaskCommands
impl FromArgMatches for TaskCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for TaskCommands
impl Subcommand for TaskCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for TaskCommands
impl RefUnwindSafe for TaskCommands
impl Send for TaskCommands
impl Sync for TaskCommands
impl Unpin for TaskCommands
impl UnwindSafe for TaskCommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more