Open chrysle opened 1 year ago
The ITEM#
stands for item number; this may be obvious to native speakers, but it's confusing to others (including me at first). Even worse, the usage help indicates multiple item numbers as a comma-separated list (ITEM#[, ITEM#, ITEM#, ...]
), but as shell arguments, these have to be separated by whitespace.
So, in order to do items 11, 42, and 99, you'd issue $ todo.sh do 11 42 99
. If you include the #
, that's the shell's comment prefix, so anything after that is ignored (unless you escape it or leave out the whitespace in front of it).
I'm all for changing the usage, though I'm a bit unsure what to use for item number (vs. the item text itself (which often is represented as the example THING I NEED TO DO
text)).
usage: todo.sh do NR [...]
I'm all for changing the usage, though I'm a bit unsure what to use for item number (vs. the item text itself (which often is represented as the example
THING I NEED TO DO
text)).usage: todo.sh do NR [...]
I'd find this more easily understandable:
usage: todo.sh do NR [NR NR...]
I think other usage messages including the ITEM#
and/or commas, like the one of depri
, should also be improved.
Can I open a PR and implement my suggestion?
Yes, sure, go ahead. I agree that this should be done consistently and everywhere.
For the syntax, I'd go with
usage: todo.sh do NR [NR ...]
(So just one repetition of the NR
, and a space separating the following ...
; incidentally, I've encountered similar syntax today in Python's argparse module, and liked that.
Do you want to request a feature or report a bug?
I think a bug.
What is the current behavior?
The todo.sh
do
command doesn't seem to work as described in the usage.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I have done some tests:
What is the expected behavior?
As described in the usage.