mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-11-09 19:13:14 -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
|
.PHONY: clean
|
||||||
c clean:
|
c clean:
|
||||||
@rm -f task.mk .task.mk
|
@rm -f task.mk .task.mk
|
||||||
### | args: --divider
|
### | args: --divider --whitespace
|
||||||
###
|
|
||||||
### examples of task.mk features | args: --divider --align center
|
### examples of task.mk features | args: --divider --align center
|
||||||
define list_files_py
|
define list_files_py
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -23,6 +23,7 @@ def rawargs(argstring):
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("-a", "--align")
|
parser.add_argument("-a", "--align")
|
||||||
parser.add_argument("-d", "--divider", action="store_true")
|
parser.add_argument("-d", "--divider", action="store_true")
|
||||||
|
parser.add_argument("-ws","--whitespace",action="store_true")
|
||||||
return parser.parse_known_args(argstring.split())
|
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)"
|
f" {'─'*(len('$(HELP_SEP)')+sum(maxlens)+2)}", "$(DIVIDER_COLOR)"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
if args.whitespace:
|
||||||
|
print()
|
||||||
|
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
|
|
Loading…
Reference in a new issue