From 5412af7d9008c29ddff424bfb4794611faaf3bcc Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 16 Jul 2020 21:31:16 -0700 Subject: [PATCH] Return touched filenames instead of printing them. --- voussoirkit/touch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voussoirkit/touch.py b/voussoirkit/touch.py index 5e10d5d..78091ed 100644 --- a/voussoirkit/touch.py +++ b/voussoirkit/touch.py @@ -11,12 +11,12 @@ from voussoirkit import winglob def touch(glob_pattern): filenames = winglob.glob(glob_pattern) if len(filenames) == 0: - safeprint.safeprint(glob_pattern) open(glob_pattern, 'a').close() + return [glob_pattern] else: for filename in filenames: - safeprint.safeprint(filename) os.utime(filename) + return filenames if __name__ == '__main__': glob_patterns = [clipext.resolve(x).strip() for x in sys.argv[1:]]