kdheepak / taskwarrior-tui

`taskwarrior-tui`: A terminal user interface for taskwarrior
https://kdheepak.com/taskwarrior-tui
MIT License
1.4k stars 68 forks source link

Specify tag during task add functionality #551

Closed muraii closed 3 months ago

muraii commented 3 months ago

Description

I would like to be able to specify a tag and/or project while adding a task in the TUI.

Solution

Add parsing logic to the input to the add-tag functionality.

Additional context

I've looked through the documentation and searched the code in the repo and didn't notice anything indicating this already works.

kdheepak commented 3 months ago

I would like to make it easier to do this in the future with a better UI but right now you can hit a for add and then type "get milk" +grocery project:chores and it should add the tag and project for the task. Hitting after + or project: should also give you context aware autocomplete. Does that not work for you?

muraii commented 3 months ago

I would like to make it easier to do this in the future with a better UI but right now you can hit a for add and then type "get milk" +grocery project:chores and it should add the tag and project for the task. Hitting after + or project: should also give you context aware autocomplete. Does that not work for you?

It does, in fact, work. Not sure if it's something in my terminal setting, but when I hit a I get a matching set of double quotes. I've never tried to move outside the closing double quote to specify anything; I assumed--obviously incorrectly--that all the input to that function in the TUI had to be within the double quotes. That's what I get for assuming!

Maybe just an example in the documentation showing that would help?

kdheepak commented 3 months ago

You can disable the double quotes with a configuration setting. The double quotes are auto inserted by default to make it easier to type a task like get John's car from shop (notice the use of a single quote in ').

All prompts are just forwarded to the shell so shell semantics still apply here.