ad-si / TaskLite

The CLI task manager for power users
https://tasklite.org
GNU Affero General Public License v3.0
216 stars 12 forks source link

"tasklite prioritize VALUE TASK_ID" does not work for negative values #54

Closed xsteve closed 3 years ago

xsteve commented 3 years ago

Example session:

% tl prioritize -3 1a64 Invalid option `-3'

Did you mean this? -h

Usage: tasklite prioritize VALUE TASK_ID ... Adjust priority of specified tasks

ad-si commented 3 years ago

Hi, that's a common problem (feature =P) of all CLI tools and the solution is equally common: Use a -- to indicate that all subsequent arguments are not flags

tl prioritize -- -3 1a64
ad-si commented 3 years ago

Since this is so common, I'm not sure if changing it would be an improvement or just a surprising behavior …

xsteve commented 3 years ago

Thanks for your quick response. This work-around solves the problem for me. However from a CLI perspective it is surprising that negative arguments are handled in a different way than positive arguments: tl prioritize 3 1a64 tl prioritize -- -3 1a64