def home.step
import bolt@1.26.0.0/src/config.bend as Configimport Base
206# a path's segment read onto the directories before it, innermost first: an
207# empty segment (from `//` or the `/` a directory ends in) and `.` stay where
208# they are, `..` goes up one (never above the root), and a name goes into it
209def home.step(+seg: String, +above: List<&2, String>) -> List<&2, String>:
210 Bool.pick(List<&2, String>, Bool.or(String.is_empty(seg), String.eq(seg, ".")), above,
211 Bool.pick(List<&2, String>, String.eq(seg, ".."), home.up(above), seg <> above))