

def complete_path(curr_dir, last_dir):
    '\n    Return the path to complete that matches the last entered component.\n    If the last entered component is ~, expanded path would not\n    match, so return all of the available paths.\n    :param curr_dir: string\n    :param last_dir: string\n    :return: string\n    '
    if ((not last_dir) or curr_dir.startswith(last_dir)):
        return curr_dir
    elif (last_dir == '~'):
        return os.path.join(last_dir, curr_dir)

dataset/ETHPy150Open j-bennet/wharfee/wharfee/helpers.py complete_path/original