Skip to content

Commit

Permalink
#101 - update built-in and README examples
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirMarkelov committed Nov 25, 2024
1 parent 55d6409 commit 45a7891
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,11 @@ If you need to edit more than one task at a time, you can use your editor of cho
Please note that the interactive edit does not support the dry-run mode.
So, all changes in the interactive mode are final ones.

In the interactive mode all command-line options that modifies tasks are ignored.
Only command-line options that defines filter for tasks are processed.
Example: the command `ttdl edit +proj --set-due=2024-11-11 -i` just opens an editor with original task subjects about project `proj`.
The modifying option `--set-due` is ignored.

First, you should set what editor TTDL will use.
It can be done either by setting environment variable `EDITOR` or by setting option `global.editor` in TTDL configuration.
Examples: `EDITOR=vim ttdl edit -i` or setting the configuration option `editor = "c:/utils/npp/notepad++.exe"`.
Expand Down Expand Up @@ -1388,7 +1393,8 @@ By default todos from a given range are processed only if they are incomplete. T

| Command | Description |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `ttdl e 2-5 "new subject"` | only the first incomplete todo with ID between 2 and 5 changes its subject (in this case todo with ID equals 2 gets subject "new subject") |
| `ttdl e 2-5 "new subject"` | only the first incomplete todos with ID between 2 and 5 changes its subject (in this case todo with ID equals 2 gets subject "new subject") |
| `ttdl e 2-5 "new subject"` -i | edits in the interactive mode todos with ID between 2 and 5. The new subject value is ignored |
| `ttdl e +proj --repl-ctx=bug1010@bug1020` | replace context `bug1010` with `bug1020` for all incomplete todos that related to project `proj` |
| `ttdl e @customer_acme --set-due=2018-12-31` | set due date 2018-12-31 for all incomplete todos that has `customer_acme` context |
| `ttdl e @customer_acme --set-due=none` | remove due date 2018-12-31 for all incomplete todos that has `customer_acme` context |
Expand Down
1 change: 1 addition & 0 deletions src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ fn print_usage(program: &str, opts: &Options) {
`ttdl e 2 --set-due=due+2d` - push the due date by 2 days
`ttdl e 2 --set-due=limit+1d` - takes task's tag `limit` as a date, adds 1 day and sets the result to the due date
`ttdl e 2 --set-due=t+1w+3d` - push the due date by a week and a half or more accurate by 10 days
`ttdl e 2-5 -i` - open an external editor of you choice the the incomplete todos with ID between 2 and 5 for interactive editing. After saving the changes and closing the editor, TTDL updates the task list
append | app - adds a text to the end of todos
prepend | prep - inserts a text at the beginning of todos
listprojects [FILTER] | listproj | lp - list all projects
Expand Down

0 comments on commit 45a7891

Please sign in to comment.