Skip to content

CLI: Reserve arguments that start with ':' for hints#363

Open
sruffell wants to merge 1 commit intoGothenburgBitFactory:devfrom
sruffell:reserve-colon-for-hints
Open

CLI: Reserve arguments that start with ':' for hints#363
sruffell wants to merge 1 commit intoGothenburgBitFactory:devfrom
sruffell:reserve-colon-for-hints

Conversation

@sruffell
Copy link
Contributor

Currently, any argument that starts with ':' that isn't a known hint
will be treated as a tag. After this change, an error is produced.

Hopefully there were not users who were using tags that start with a
colon...

Closes #348

@sruffell sruffell force-pushed the reserve-colon-for-hints branch 2 times, most recently from 7b2fd1c to fe42fa9 Compare August 14, 2020 21:46
Copy link
Member

@lauft lauft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin good so far, but I think we need also to address cases when a user tries to (un)tag an interval with a (pseudo-)hint, e.g.:

timew (un)tag @1 :quiet # should already be handled...
timew (un)tag @1 :unknown
timew (un)tag @1 FOO :unknown 

@lauft lauft added the enhancement New feature or request label Aug 19, 2020
@sruffell sruffell force-pushed the reserve-colon-for-hints branch from fe42fa9 to c22375b Compare August 25, 2020 06:22
@sruffell
Copy link
Contributor Author

sruffell commented Aug 25, 2020

Lookin good so far, but I think we need also to address cases when a user tries to (un)tag an interval with a (pseudo-)hint, e.g.:

timew (un)tag @1 :quiet # should already be handled...
timew (un)tag @1 :unknown
timew (un)tag @1 FOO :unknown 

I'm not sure I understand? Anytime an invalid hint is specified, timewarrior will report the error halt.

Here is the behavior in the current iteration of this pull request:

$ src/timew tag @1 :unknown
Unknown hint ':unknown'
$ src/timew tag @1 FOO :unknown
Unknown hint ':unknown'

What is the expected behavior in this case?

Currently, any argument that starts with ':' that isn't a known hint
will be treated as a tag. After this change, an error is produced.

Hopefully there were not users who were using tags that start with a
colon...

Closes GothenburgBitFactory#348

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
@sruffell sruffell force-pushed the reserve-colon-for-hints branch from c22375b to b348dba Compare November 9, 2020 21:50
@lauft lauft self-assigned this Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-branch enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should arguments that begin with ':' be reserved for hints?

2 participants