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

Allow spaces in project names? #81

Closed
mdickinson opened this issue Jun 30, 2020 · 2 comments
Closed

Allow spaces in project names? #81

mdickinson opened this issue Jun 30, 2020 · 2 comments

Comments

@mdickinson
Copy link

Thank you for this excellent tool! I have a minor feature request: would it be possible to allow spaces in project names? I make heavy use of the "project: task" syntax, but my projects often naturally have spaces in:

Example:

$ utt add "test project: just testing"
$ utt add "galactic domination: buy pencils for death star sketches"

This currently works, but test_project and galactic domination aren't recognised as projects, and in the report I see something like:

(0h46)    : -- Current Activity --, galactic domination: buy paper for death star blueprint, test project: just testing

If the idea seems reasonable, I'm happy to take some time to try to create a PR.

@larose
Copy link
Owner

larose commented Jul 4, 2020

Hi @mdickinson, I'm glad that you like utt and thanks for the feature request!

The reason behind why project names can't contain spaces or colons is to unambiguously differentiate the project name from the rest of the entry. Otherwise, how would we know that there is no project in "this is an entry with a : in the middle", but that there is one in "galactic domination: buy pencils for death star sketches"?

I'm worried that allowing spaces in project names will introduce a breaking change to many users. Of course, there would be many other ways to parse and store project names in utt, but when I created utt 7 years ago I apparently thought it was a good idea to not allow spaces and colons in project names.

Also, I think you can easily work around this limitation by replacing spaces with - or _ in a project name. Example: utt add "galactic-domination: buy pencils for death star sketches".

Given the reasons mentioned above, I would prefer to keep the current behavior.

@mdickinson
Copy link
Author

Thanks for the response and explanation! I had a feeling I was overlooking something obvious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants