def opt_join(option, do_sort=False):
    """join command line option values to a single list.

    Here is an example:
    >>> a=["a b","c","d e f"]
    >>> opt_join(a)
    ['a', 'b', 'c', 'd', 'e', 'f']
    """
    if option is None:
        return None
    lst = ' '.join(option).split()
    if do_sort:
        lst.sort()
    return lst
