add sh shorthand

This commit is contained in:
JOLIMAITRE Matthieu 2024-06-24 03:02:38 +02:00
parent 0f5b0d18d8
commit 12f109adf3
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import { next, range } from "./utils.ts"; import { next } from "./utils.ts";
import { range } from "./Range.ts";
export function it<T>(iter: Iterable<T>) { export function it<T>(iter: Iterable<T>) {
return new Iter(iter); return new Iter(iter);

View file

@ -33,3 +33,7 @@ export function log_from(meta: ImportMeta, logging_function = console.log) {
const prefix = `[${path}]`; const prefix = `[${path}]`;
return (...args: unknown[]) => logging_function(prefix, ...args); return (...args: unknown[]) => logging_function(prefix, ...args);
} }
export function sh(line: string) {
return new Deno.Command("bash", { args: ["-c", line] });
}