mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-22 01:50:44 -06:00
feat: add whitespace argument
This commit is contained in:
parent
60333cf92d
commit
570df70a6b
2 changed files with 4 additions and 2 deletions
3
Makefile
3
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
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue