From 570df70a6b434473ec76a92da4cc082668ae0ade Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 13 Sep 2022 18:51:19 -0500 Subject: [PATCH] feat: add whitespace argument --- Makefile | 3 +-- src/help.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ba42ab4..182ffc5 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,7 @@ release: version-check .PHONY: clean c clean: @rm -f task.mk .task.mk -### | args: --divider -### +### | args: --divider --whitespace ### examples of task.mk features | args: --divider --align center define list_files_py from pathlib import Path diff --git a/src/help.py b/src/help.py index da68ed1..7fb0b93 100644 --- a/src/help.py +++ b/src/help.py @@ -23,6 +23,7 @@ def rawargs(argstring): parser = argparse.ArgumentParser() parser.add_argument("-a", "--align") parser.add_argument("-d", "--divider", action="store_true") + parser.add_argument("-ws","--whitespace",action="store_true") return parser.parse_known_args(argstring.split()) @@ -71,6 +72,8 @@ def print_rawmsg(msg, argstr, maxlens): f" {'─'*(len('$(HELP_SEP)')+sum(maxlens)+2)}", "$(DIVIDER_COLOR)" ) ) + if args.whitespace: + print() def print_help():