

def get_command(options, vexrc, environ):
    'Get a command to run.\n\n    :returns:\n        a list of strings representing a command to be passed to Popen.\n    '
    command = options.rest
    if (not command):
        command = vexrc.get_shell(environ)
    if (command and command[0].startswith('--')):
        raise exceptions.InvalidCommand(("don't put flags like '%s' after the virtualenv name." % command[0]))
    if (not command):
        raise exceptions.InvalidCommand('no command given')
    return command

dataset/ETHPy150Open sashahart/vex/vex/main.py get_command/original