forked from janek/mostr
fix: slight interaction and documentation improvements
This commit is contained in:
parent
cc64c0f493
commit
dc8df51e0f
|
@ -131,7 +131,7 @@ If you want to TBC...
|
||||||
|
|
||||||
- `TASK` - create task
|
- `TASK` - create task
|
||||||
+ prefix with space if you want a task to start with a command character
|
+ prefix with space if you want a task to start with a command character
|
||||||
+ copy in text with newlines to create one task per line
|
+ paste text with newlines to create one task per line
|
||||||
- `.` - clear all filters
|
- `.` - clear all filters
|
||||||
- `.TASK`
|
- `.TASK`
|
||||||
+ activate task by id
|
+ activate task by id
|
||||||
|
@ -140,7 +140,8 @@ If you want to TBC...
|
||||||
- `.2` - set view depth to the given number (how many subtask levels to show, default is 1)
|
- `.2` - set view depth to the given number (how many subtask levels to show, default is 1)
|
||||||
- `/[TEXT]` - activate task or filter by smart-case substring match (empty: move to root)
|
- `/[TEXT]` - activate task or filter by smart-case substring match (empty: move to root)
|
||||||
- `||TASK` - create and activate a new task procedure (where subtasks automatically depend on the previously created task)
|
- `||TASK` - create and activate a new task procedure (where subtasks automatically depend on the previously created task)
|
||||||
- `|[TASK]` - (un)mark current task as procedure or create a sibling task depending on the current one and move up
|
- `|[TASK]` - mark current task as procedure or create a sibling task depending on the current one and move up
|
||||||
|
- sibling task shortcut?
|
||||||
|
|
||||||
Dot or slash can be repeated to move to parent tasks before acting.
|
Dot or slash can be repeated to move to parent tasks before acting.
|
||||||
Append `@TIME` to any task creation or change command to record the action with the given time.
|
Append `@TIME` to any task creation or change command to record the action with the given time.
|
||||||
|
@ -274,7 +275,7 @@ since they will automatically take on that context.
|
||||||
By automating these contexts based on triggers, scripts or time,
|
By automating these contexts based on triggers, scripts or time,
|
||||||
relevant tasks can be surfaced automatically.
|
relevant tasks can be surfaced automatically.
|
||||||
|
|
||||||
#### Example
|
#### Vision of Work-Life-Balance for Freelancer
|
||||||
|
|
||||||
In the morning, your groggy brain is good at divergent thinking,
|
In the morning, your groggy brain is good at divergent thinking,
|
||||||
and you like to do sports in the morning.
|
and you like to do sports in the morning.
|
||||||
|
|
|
@ -554,6 +554,7 @@ async fn main() -> Result<()> {
|
||||||
match arg {
|
match arg {
|
||||||
None => match tasks.get_position() {
|
None => match tasks.get_position() {
|
||||||
None => {
|
None => {
|
||||||
|
info!("Use | to create dependent sibling task and || to create a procedure");
|
||||||
tasks.set_state_filter(
|
tasks.set_state_filter(
|
||||||
StateFilter::State(State::Procedure.to_string()));
|
StateFilter::State(State::Procedure.to_string()));
|
||||||
}
|
}
|
||||||
|
@ -643,7 +644,7 @@ async fn main() -> Result<()> {
|
||||||
Ok(number) => max = number,
|
Ok(number) => max = number,
|
||||||
Err(e) => warn!("Unsure what to do with {:?}", e),
|
Err(e) => warn!("Unsure what to do with {:?}", e),
|
||||||
}
|
}
|
||||||
let (label, mut times) = tasks.times_tracked();
|
let (label, times) = tasks.times_tracked();
|
||||||
println!("{}\n{}", label.italic(),
|
println!("{}\n{}", label.italic(),
|
||||||
times.rev().take(max).collect_vec().iter().rev().join("\n"));
|
times.rev().take(max).collect_vec().iter().rev().join("\n"));
|
||||||
} else if let Ok(key) = PublicKey::parse(arg) { // TODO also match name
|
} else if let Ok(key) = PublicKey::parse(arg) { // TODO also match name
|
||||||
|
@ -658,7 +659,7 @@ async fn main() -> Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let (label, mut times) = tasks.times_tracked();
|
let (label, times) = tasks.times_tracked();
|
||||||
println!("{}\n{}", label.italic(),
|
println!("{}\n{}", label.italic(),
|
||||||
times.rev().take(80).collect_vec().iter().rev().join("\n"));
|
times.rev().take(80).collect_vec().iter().rev().join("\n"));
|
||||||
}
|
}
|
||||||
|
@ -749,7 +750,6 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
_ =>
|
_ =>
|
||||||
if Regex::new("^wss?://").unwrap().is_match(command.trim()) {
|
if Regex::new("^wss?://").unwrap().is_match(command.trim()) {
|
||||||
tasks.move_to(None);
|
|
||||||
if let Some((url, tasks)) = relays.iter().find(|(key, _)| key.as_ref().is_some_and(|url| url.as_str().starts_with(&command))) {
|
if let Some((url, tasks)) = relays.iter().find(|(key, _)| key.as_ref().is_some_and(|url| url.as_str().starts_with(&command))) {
|
||||||
selected_relay.clone_from(url);
|
selected_relay.clone_from(url);
|
||||||
println!("{}", tasks);
|
println!("{}", tasks);
|
||||||
|
@ -780,7 +780,7 @@ async fn main() -> Result<()> {
|
||||||
println!("{}", tasks);
|
println!("{}", tasks);
|
||||||
}
|
}
|
||||||
Err(ReadlineError::Eof) => break 'repl,
|
Err(ReadlineError::Eof) => break 'repl,
|
||||||
Err(ReadlineError::Interrupted) => break 'repl, // TODO exit if prompt was empty, or clear
|
Err(ReadlineError::Interrupted) => break 'repl, // TODO exit only if prompt is empty, or clear
|
||||||
Err(e) => warn!("{}", e),
|
Err(e) => warn!("{}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue