def key_lookup
import cli@0.2.0.0/cli.bend as Cliimport Base
2659# find_key(keys, query, None{}), copying only the key it finds.
2660def key_lookup(+keys: List<&2, OptKey>, +query: String) ->
2661 Maybe<&2, OptFound>:
2662 hit = head_named(keys, query)
2663 rank = key_rank(keys, query, 0n, hit)
2664 key_at(rank, keys)