def filter_move(path_old, path_new): if dirname(path_old) == dirname(path_new): label = "rename" path_new = basename(path_new) else: label = "move" return "%s %s to %s" % (T.green(label), T.underline(path_old), T.underline(path_new)), 0
def format_move(path_old, path_new): path_old = abspath(path_old) path_new = abspath(path_new) if dirname(path_old) == dirname(path_new): label = "rename" path_new = basename(path_new) else: label = "move" return "%s %s to %s" % (T.green(label), T.underline(path_old), T.underline(path_new))