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

Shell tasks #65

Open
Yohe-Am opened this issue May 9, 2024 · 1 comment
Open

Shell tasks #65

Yohe-Am opened this issue May 9, 2024 · 1 comment
Labels
enhancement New feature or request ghjk tasks Relating to the tasks module

Comments

@Yohe-Am
Copy link
Contributor

Yohe-Am commented May 9, 2024

An alternative task type that uses a shell directly instead of js functions.

Syntax:

task.shell(`echo Hello $name`)
task.shell(
  `echo line 1`,
  `echo line 2`,
)
task.shell(`
echo line1
echo line2
`)

The script will run in the deno_task_shell that dax provides. This avoids the cost of having to run the ghjk.ts in a worker that the current denoFilev@v1 tasks have to face.

We'll also allowing specific shells like...

task.bash(`ps`)

This will require ports for the specified shells to be installed first. An interesting feature might be to support shell tasks to run in process of the shell that invokes them allowing users to do source. A very advanced version of this feature would be tasks that run different code depending on the shell the user's using though I personally think this is overkill. Maybe there's some embedded shell language that's designed for transpilation we can use.

This feature will come in handy when used with:

  • task aliases, providing an easy way to declare program aliases
  • env hooks, providing low latency env hooks
Copy link

linear bot commented May 9, 2024

MET-506 Shell tasks

@Yohe-Am Yohe-Am added enhancement New feature or request tasks Relating to the tasks module labels May 9, 2024
@Yohe-Am Yohe-Am added the ghjk label Jul 29, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ghjk tasks Relating to the tasks module
Projects
None yet
Development

No branches or pull requests

1 participant