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