-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "todo edit --description" for comfy editing in external editor #312
base: main
Are you sure you want to change the base?
Conversation
I'm not sure what I should do (or whether i should do anything) about codecov check failure. |
Thanks, this looks pretty good. Can you please add some tests for that cover this new feature? Again, thanks! |
This is inconsistent with `todo new` which has an option for reading the
description from stdin.
Not entirely sure what's better but I think we should standardize on this.
…On Sat, May 19, 2018 at 10:47:50AM -0700, Hugo Osvaldo Barrera wrote:
Thanks, this looks pretty good. `--description` sounds _slightly_ odd, but I can't think of anything better, so it's fine by me ***@***.***, any comments?).
Can you please add some tests for that cover this new feature?
Also, please add yourself to AUTHORS and include a CHANGELOG entry (this'd be v3.5.0)
Again, thanks!
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#312 (comment)
|
This would occur when you quit the editor without saving, since then click.edit() will return None rather than the text. Now this case is properly handled.
When editing the description with `<C-O>` in the UI, the resulting text is stripped of whitespace. This should be done too when using `--description`.
Is there some recommended way to use |
You can use -i. There is a shortcut to open $EDITOR for the currently focused textfield in the interactive UI
Or you write a wrapper script
…On 19 May 2018 21:55:34 GMT+02:00, hut ***@***.***> wrote:
Is there some recommended way to use `todo new --read-description`
combined with a text editor?
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#312 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I guess it's best to add an option that reads from stdin. While using the text editor directly is probably the most common use case... Once you got another use case, you'd be out of luck. Q1: The user would be left to implement tons of boilerplate though, reading the info from stdin, calling the editor, etc. Maybe we should provide a wrapper script, if we do it this way? Q2: I can't find a way to easily fetch the description of a task. |
I won't break anything, adding to |
My primary use case of todoman is comfortable editing of descriptions of tasks in a separate editor. The reason is that most data of a task is simple enough to be editable via low-bandwidth interfaces like android clients or thunderbird/lightning. But the description may contain a long text, so the use of a dedicated text editor is warranted.
Currently the same thing can be achieved by running
todo edit <taskid>
, pressing the arrow key down, then pressing<C-O>
. With the option from this PR, all you need is to pass the--description
option to theedit
command to open the item directly in the editor.Feel free to change the name of the option. Related issue: #292