def get_multiline_actions(a_string):
    """
    Transforms the multiline command string provided into a list of single-line commands.

    :param a_string:
    :return: a list of action strings
    """
    def _procline(l):
        # remove spaces on the left
        l = l.strip()

        # remove comments
        try:
            cmt_idx = l.index('#')
            l = l[:cmt_idx]
        except:
            pass

        # finally remove trailing spaces
        return l.rstrip()

    lines = [_procline(l) for l in a_string.splitlines()]
    return [l for l in lines if len(l) > 0]