'Parses the given line.
Args:
line : The line to parse
keys : A list of keys to map onto the args
force_keys : True to enforce that the line has a value for every key
Returns:
A dict of key:arg'

def _parse(self, line, keys, force_keys=False):

    line_args = shlex.split(line)
    if (force_keys and (len(line_args) != len(keys))):
        raise IndexError(('Must    specify    all    args:    %s' % keys))
    for (i, arg) in enumerate(line_args):
        for config_key in self.config:
            if (('$' + config_key) in arg):
                arg = arg.replace(('$' + config_key), self.config[config_key])
        line_args[i] = arg
    return dict(zip(keys, line_args))
