From 3b647029554598e281cfa7f91b70a966dbd7b773 Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Sun, 7 Apr 2024 05:29:33 +0000 Subject: [PATCH] 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 --- README | 17 +++++++++++++---- bake.1 | 8 ++++---- bake.c | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README b/README index a882f07..6e21c8c 100644 --- a/README +++ b/README @@ -44,16 +44,25 @@ are still supported, avoid these in the future. They are most useful for a template command, such as: @BAKE cc @FILENAME -o @SHORT @ARGS -Backslash, while otherwise ignored, will be respected at the end of the line -to concatenate lines together or if added to before any of listed macros will -yield the unfettered text. +Backslash, while otherwise ignored, will be respected at the end of the line to +concatenate lines together or if added to before any of listed macros will yield +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 --- -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. -n, --dry-run: DRYRUN, does NOT run anything! + -x, --expunge: See above Expunge Extension section. --- Shake --- diff --git a/bake.1 b/bake.1 index 143320a..783c4d5 100644 --- a/bake.1 +++ b/bake.1 @@ -17,7 +17,7 @@ appears. \fBShake\fP does not support some features of \fBBake\fP, such as \fB@STOP\fP or \fBbinary files\fP, please avoid its use. -Options [Only one, Must always be put first] +Options [Must always be put first, may be merged together] .HP .B \-v \-\-version, \-h \-\-help, \-n \-\-dry\-run @@ -27,13 +27,13 @@ Expansions These will expand to their counterpart statically first thing. These may only be inserted inside of markers. .TP -.B $@ +.B @FILENAME, $@ returns target\-file (abc.x.txt) .TP -.B $* +.B @SHORT, $* returns target\-file without suffix (abc.x.txt \-> abc.x) .TP -.B $+ +.B @ARGS, $+ returns .B arguments diff --git a/bake.c b/bake.c index 1b9372d..c6287c0 100644 --- a/bake.c +++ b/bake.c @@ -40,7 +40,7 @@ "rest of line, or if found within the file, until the " BOLD "@STOP" RESET " marker.\n" \ #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 \ "Expansions\n" \ "\t" YELLOW "@FILENAME" RESET " returns target-file (abc.x.txt)\n" \