def _c0wrap(styles):
    """wrap a set of ANSI styles in C0 control codes for readline safety."""
    C0_SOH = '\x01'   # mark the beginning of nonprinting characters
    C0_STX = '\x02'   # mark the end of nonprinting characters
    return "{}{}{}".format(C0_SOH, "".join(styles), C0_STX)