diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-05-14 16:08:04 +0200 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-05-14 16:08:04 +0200 |
| commit | 511f30b96d06041f528ec005e4d3edffc4047608 (patch) | |
| tree | a93f707558255636e336cdac8dba0023f64a136a /README.md | |
| parent | d5be1b2375c4adcf4840ac379fe88aa2fae45771 (diff) | |
update 1.2.5
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 57 |
1 files changed, 54 insertions, 3 deletions
@@ -1,7 +1,58 @@ # runfile (`rfile`) -a **suckless**, **minimal**, **zero-dependancy**, **POSIX C99** alternative to `Makefile`/`justfile`s to *just run commands*. + +a **suckless** and **minimal**, **POSIX C99** alternative to `Makefile`/`justfile`! + +--- + +## `rfile` syntax & features + +- `#` -> ignore line (comment) + + +### variables + +the variable system in `rfile`s is very minimal: + +- every variable is a _string_ +- when accessed, `rf` text-substitutes the variable with its content + +example: +``` +@cc=gcc +@inp=rf.c +@out=rf +@opts=-Wall -Wextra -pedantic -std=c99 + +@cc @inp -o @out @opts +# becomes 'gcc rf.c -o rf -Wall -Wextra -pedantic -std=c99' +``` + + +### rfile command prefix (`@`) + +- `@: [msg]` -> print/log +- `@var=cmd` -> create variable `var` +- `@var` -> access variable `var` + + +### command sections + +example syntax: + +``` +section { + @: hello! +} +``` + +every other line is treated as a command and will run normally. + +> if no section is specified when calling `rf`, only commands in global scope will run. + +--- ## usage -1. create an `rfile` with commands divided by a `\n` -2. run `rf` in that directory. + +1. create an `rfile`. +2. run `rf [section name]` :) |