Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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 

src/CLI.cpp Outdated Show resolved Hide resolved
test/cli.t Outdated Show resolved Hide resolved
@lauft lauft added the enhancement New feature or request label Aug 19, 2020
@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 <[email protected]>
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