def prompt():
    """
    Return string suitable for displaying prompt and available commands.
    """
    from x84.bbs import getsession, getterminal
    session, term = getsession(), getterminal()
    decorate = lambda key, desc: u''.join((u'(', term.magenta_underline(key
        ), u')', term.cyan(desc.split()[0]), u' ', u' '.join(desc.split()[1
        :]), u' '))
    return term.wrap(u''.join((u' ' * 2, term.green_reverse(':keys'), u' ',
        decorate('c', 'hAt USR'), decorate('s', 'ENd MSG'), u''.join((
        decorate('d', 'iSCONNECt SiD'), decorate('e', 'diT USR'), decorate(
        'v', 'iEW SiD AttRS'), u' ')) if 'sysop' in session.user.groups else
        u'', decorate('Escape/q', 'Uit'), decorate('Spacebar', 'REfRESh'))),
        int(term.width * 0.8), subsequent_indent=u' ' * 8)
