def trail
import ezx@1.11.0.0/src/ledger/ignore.bend as Ignoreimport Base
55# one trailing `/`, which only narrows a pattern to directories, and every
56# path ez names here is one
57def trail(+pat: String) -> String:
58 Bool.pick(String, String.ends_with(pat, "/"),
59 String.take(pat, Nat.sub(String.length(pat), 1n)), pat)