Added help and exit

This commit is contained in:
2026-04-27 12:15:58 -04:00
parent 47a6796e1c
commit 7b2bb509ec
13 changed files with 103 additions and 23 deletions

View File

@@ -1,6 +1,11 @@
from pathlib import Path
def main(args):
for target in args:
path = Path(target)
path.touch(exist_ok=True)
if args == []:
print("touch_file: no arguments were given")
elif args == ["-h"] or args == ["--help"]:
print("touch_file: bro was lazy")
else:
for target in args:
path = Path(target)
path.touch(exist_ok=True)