You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to set up taskwarrior in a way that the tasks I see are dependant on the path I'm navigating.
I tried several things, and I can't understand the taskwarrior way of doing things...
I made some tasks and created a project and a context for the project, I made a function on my .zshrc that sets the taskwarrior context everytime I cd based on a dict {"/foo/bar" : "some_context"}, it didn't work perfect but it did the trick.
But then I opened 2 shells and worked in 2 different projects and the context of my first shell was hijacked when the context of my other shell was changed, I don't understand that default, but I'd need an alternative to solve my needs,
essentially I want to associate projects with paths and everytime I do task see the tasks associated to that project or all if none is associated to current path.
Any idea?
EDIT: Made some progress using:
direnv
defining an .env with TASKWARRIOR_PROJECT env inside for the appropriate project
script does vit project:${TASKWARRIOR_PROJECT}"
I don't like that when I add a task is not appended to the current project, so I'll likely set the context too automatically, but this is hacks on top of hacks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to set up taskwarrior in a way that the tasks I see are dependant on the path I'm navigating.
I tried several things, and I can't understand the taskwarrior way of doing things...
I made some tasks and created a project and a context for the project, I made a function on my .zshrc that sets the taskwarrior context everytime I
cd
based on a dict {"/foo/bar" : "some_context"}, it didn't work perfect but it did the trick.But then I opened 2 shells and worked in 2 different projects and the context of my first shell was hijacked when the context of my other shell was changed, I don't understand that default, but I'd need an alternative to solve my needs,
essentially I want to associate projects with paths and everytime I do
task
see the tasks associated to that project or all if none is associated to current path.Any idea?
EDIT: Made some progress using:
.env
with TASKWARRIOR_PROJECT env inside for the appropriate projectvit project:${TASKWARRIOR_PROJECT}"
I don't like that when I add a task is not appended to the current project, so I'll likely set the context too automatically, but this is hacks on top of hacks.
Beta Was this translation helpful? Give feedback.
All reactions