def has_alias
import cli@0.2.0.0/cli.bend as Cliimport Base
2679# Whether items alias query; after a hit it walks no further.
2680def has_alias(items: List<&2, Item>, +query: String, found: Bool) -> Bool:
2681 match items found:
2682 case _ True{}: True{}
2683 case Nil{} False{}: False{}
2684 case Alias{name} <> tail False{}:
2685 has_alias(tail, query, same_text(name, query))
2686 case head <> tail False{}: has_alias(tail, query, False{})