dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
965 stars 33 forks source link

feat: support subshells #232

Closed dsherret closed 5 months ago

dsherret commented 5 months ago
{
  const result = await $`(echo 1 && echo 2) | cat -`.text();
  assertEquals(result, "1\n2");
}
{
  const result = await $`echo 1 && (echo 2 && exit 1 && echo 3) || echo 4`.text();
  assertEquals(result, "1\n2\n4");
}