def tool.lead

ezx@1.11.0.0 · src/share/args.bend:96

import ezx@1.11.0.0/src/share/args.bend as Args
import Base

96# the words after `tool run` with a leading `--entry <file>` taken off. The
97# flag comes before the target, as uvx takes its own options before the
98# command, so every word after the target is the program's.
99def tool.lead(xs: List<&2, String>) -> List<&2, String>:
100  match xs:
101    case Nil{}:
102      Nil{}
103    case Con{+h, +t}:
104      Bool.pick(List<&2, String>, String.eq(h, "--entry"), rest(t), h <> t)

Uses (5)

Used by (1)