todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.56k stars 713 forks source link

New actions: downgrade (dg) and upgrade (ug) #309

Closed silviubogan closed 4 years ago

silviubogan commented 4 years ago

Do you want to request a feature or report a bug? Feature.

What is the current behavior? There is no option to downgrade all the priorities with one level down.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior? It would be very helpful to have an action such as dg (downgrade) that receives just a single priority, e.g. (C). For the (C) input, this action would make the following replacements in the reverse order of the one in this list:

(C) -> (D)
(D) -> (E)
(E) -> (F)
(F) -> (G)
[and so on, till the lowest used priority]

Which versions todo.sh are you using?

Run todo.sh -V

> todo.sh -V
TODO.TXT Command Line Interface v2.11.0

Homepage: http://todotxt.org
Code repository: https://github.com/todotxt/todo.txt-cli/
Contributors: https://github.com/todotxt/todo.txt-cli/graphs/contributors
License: https://github.com/todotxt/todo.txt-cli/blob/master/LICENSE

Which Operating System are you using? Ubuntu 20.04

Which version of bash are you using?

Run bash --version

> bash --version
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

The similar opposite action, ug (upgrade), would be nice too.

Thank you.

inkarkat commented 4 years ago

I'm against introducing the suggested actions into the core application, because:

API notes

The terms upgrade / downgrade don't immediately create a connection to priorities in my mind. Also, I would combine both into a repri action, taking a mandatory offset:

$ todo.sh repri c -2    # Turns (C) into (E) and so on
karbassi commented 4 years ago

I love the idea but as an addon. This allows people who want the functionality to add the 'addon' and for us not to confuse the users who don't need it.