Add untyped command wrapper

This commit is contained in:
Alexander Gehrke 2024-05-18 14:30:05 +02:00
parent 1ea8c0faec
commit 2dc7e0a0e4

View file

@ -227,6 +227,10 @@ object TypedCommand:
def interactive(cmd: String*)(using Path): TypedCommand[Vector[String]] = def interactive(cmd: String*)(using Path): TypedCommand[Vector[String]] =
TypedCommand(runInteractive, cmd.mkString(" "), cmd.toVector) TypedCommand(runInteractive, cmd.mkString(" "), cmd.toVector)
def untyped(cmd: String*)(using Path): TypedCommand[Vector[String]] =
TypedCommand(exec = run, display = "", cmd.toVector, cmdIsHidden = true, outputIsHidden = false)
end TypedCommand
sealed abstract case class Silent[T] private (doStuff: () => T) extends Slide sealed abstract case class Silent[T] private (doStuff: () => T) extends Slide
object Silent: object Silent:
def apply[T](doStuff: => T) = new Silent(() => doStuff) {} def apply[T](doStuff: => T) = new Silent(() => doStuff) {}