documentation is important

and usually comes as an afterthought
I nearly forgot to add this basic information for general usability
Imagine this not being a general requirement for all software
This commit is contained in:
Chad C. Starz 2024-04-07 05:29:33 +00:00
parent 85fb72bdcb
commit 3b64702955
No known key found for this signature in database
GPG Key ID: CEEBC9208C287297
3 changed files with 18 additions and 9 deletions

17
README
View File

@ -44,16 +44,25 @@ are still supported, avoid these in the future.
They are most useful for a template command, such as: They are most useful for a template command, such as:
@BAKE cc @FILENAME -o @SHORT @ARGS @BAKE cc @FILENAME -o @SHORT @ARGS
Backslash, while otherwise ignored, will be respected at the end of the line Backslash, while otherwise ignored, will be respected at the end of the line to
to concatenate lines together or if added to before any of listed macros will concatenate lines together or if added to before any of listed macros will yield
yield the unfettered text. the unfettered text. \SPECIAL_NAME will result in SPECIAL_NAME in the executed
shell command. Backslashes are applicable to all symbols used by Bake, they are
ignored otherwise.
--- Expunge Extension ---
Removes any singular file or directory non recursively defined within @{...},
this has no effect on the normal processing of the statement and is macro'd out
before it is executed.
--- Options --- --- Options ---
only one option may be in use at a time, and must come as the first argument. Options must come as the first argument, and may be merged together, such as -xn.
-h, --help: displays help message, similarly to empty input. -h, --help: displays help message, similarly to empty input.
-n, --dry-run: DRYRUN, does NOT run anything! -n, --dry-run: DRYRUN, does NOT run anything!
-x, --expunge: See above Expunge Extension section.
--- Shake --- --- Shake ---

8
bake.1
View File

@ -17,7 +17,7 @@ appears.
\fBShake\fP does not support some features of \fBBake\fP, such as \fB@STOP\fP or \fBbinary files\fP, \fBShake\fP does not support some features of \fBBake\fP, such as \fB@STOP\fP or \fBbinary files\fP,
please avoid its use. please avoid its use.
Options [Only one, Must always be put first] Options [Must always be put first, may be merged together]
.HP .HP
.B \-v \-\-version, \-h \-\-help, \-n \-\-dry\-run .B \-v \-\-version, \-h \-\-help, \-n \-\-dry\-run
@ -27,13 +27,13 @@ Expansions
These will expand to their counterpart statically first thing. These will expand to their counterpart statically first thing.
These may only be inserted inside of markers. These may only be inserted inside of markers.
.TP .TP
.B $@ .B @FILENAME, $@
returns target\-file (abc.x.txt) returns target\-file (abc.x.txt)
.TP .TP
.B $* .B @SHORT, $*
returns target\-file without suffix (abc.x.txt \-> abc.x) returns target\-file without suffix (abc.x.txt \-> abc.x)
.TP .TP
.B $+ .B @ARGS, $+
returns returns
.B arguments .B arguments

2
bake.c
View File

@ -40,7 +40,7 @@
"rest of line, or if found within the file, until the " BOLD "@STOP" RESET " marker.\n" \ "rest of line, or if found within the file, until the " BOLD "@STOP" RESET " marker.\n" \
#define DESC \ #define DESC \
"Options [Must always be first]\n" \ "Options [Must always be put first, may be merged together]\n" \
"\t" DIM "-h --help" RESET", " BOLD "-n --dry-run" RESET ", " BOLD "-x --expunge\n" RESET \ "\t" DIM "-h --help" RESET", " BOLD "-n --dry-run" RESET ", " BOLD "-x --expunge\n" RESET \
"Expansions\n" \ "Expansions\n" \
"\t" YELLOW "@FILENAME" RESET " returns target-file (abc.x.txt)\n" \ "\t" YELLOW "@FILENAME" RESET " returns target-file (abc.x.txt)\n" \