Replies: 2 comments 1 reply
-
Unfortunately, it's not so much that this goes against Task's philosophy as much as it is simply not possible. When you run a program from a shell, it runs as a child process (inheriting the directory from its parent). It is not possible to influence the parent shell in any way (including its current directory) since this would open up serious security issues. When you run This problem is distinct from the fact that each Task command runs in its own subshell which stops you from being able to change directories between Task commands (this is actually fixable).
As an aside, this may not be exactly what you're looking for, but if you're a ZSH user like me, then you might find that a tool like I'm sure there are similar tools out there for Bash/Powershell users too, but I'm not as familiar with those shells and their tools. |
Beta Was this translation helpful? Give feedback.
-
Feels like Task needs some base standard library stuff to do these things in a cross platform way. then devs can reference them as first class things from their tasks. a bit like u-root does. Google uses u-root for provisioning btw. https://github.com/u-root/u-root/blob/main/cmds/core/cp/cp.go https://github.com/u-root/u-root/blob/main/cmds/core/echo/echo.go |
Beta Was this translation helpful? Give feedback.
-
When I discovered Task, I envisioned starting things and moving around, but running CD as a task is pointless due to the sub process thing.
I hope it doesnt go against the philosophy of Task to have a way to change directory as well as start tasks.
I want to be able to group and use task to start things or move somewhere conveniently:
imagine somewhere is;
c:/users/thor/source/repos/work/proofofconcept/net8.0/WinFormsApp1/src/WinFormsApp1.Tests
my day to day job involves a 800+ projects in a cute little monolith :) (it is what it is) I want to be able to jump around quickly.
Beta Was this translation helpful? Give feedback.
All reactions