aesophor / py-todo

📋 Lightweight reminder / todo-list in cli
https://www.reddit.com/r/unixporn/comments/9qy35q/oc_pytodo_a_lightweight_reminder_in_cli/
MIT License
107 stars 22 forks source link

Let current values be default when editing items. #19

Closed drasbeck closed 5 years ago

drasbeck commented 5 years ago

As of 1.3 the current values (Title, Date) are not used as default, when editing items. This means that one has to rewrite the name, to edit the deadline and vice versa. This is trivial for short items, but cumbersome for longer titled items.

One solution could be to let current values be the default, and show them in parentheses when prompting, so that pressing enter when prompted for either, that value is kept.

An editing scenario with index 1 item named "Linear Algebra Test, Pages 12-666, Bldg 13 Room 101" would look like:

$ todo -e 1
Title (Linear Algebra Test, Pages 12-666, Bldg 13 Room 101): |

Instead of the current:

$ todo -e 1
Title: |

So that simply pressing enter keeps the current title, whereas it currently changes the item to have an empty title.

aesophor commented 5 years ago

Thanks! Solved it in commit 86d47c8b36ead2b397b4c26e89b8415020d50eb2!

Edit: If you need anything else, please let me know! Thanks!

Steampunkery commented 5 years ago

Lol I actually had this idea and I have it in an uncommitted PR. It'll be in my next one.

aesophor commented 5 years ago

Lol I actually had this idea and I have it in an uncommitted PR. It'll be in my next one.

You guys are really creative! This program really has improved a lot with your help :tada: