Skip to content

Throw an error on unknown arguments #224

@ag-TJNII

Description

@ag-TJNII

I've lost count of how many times I've done this:

$ t edit -i 308 --out 14:00
Editing entry with id 308

Timesheet: 20250818
    Day                Start      End        Duration   Notes
    Thu Aug 21, 2025   11:30:00 - 13:00:00   1:30:00    --out 14:00
                                             1:30:00
    ---------------------------------------------------------------
    Total                                    1:30:00

I think it's unlikely for Notes to start with - and more likely the user is confusing option arguments. I don't need to edit often so the fact that it's t in normally but t edit --start (and t out / t edit --end) always trips me. In the case of passing a bad option argument I'd prefer to get an error, not replace my note with junk. I think it would be helpful for this utility to treat arguments starting with - as an option. If users to need to start a note with - then the -- "end of options" marker, which is a POSIX guideline, is the solution.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions