Skip to content

Special Directives

William Young edited this page May 27, 2018 · 11 revisions

Special Directives are special commands that will produce an output on the final file, normally to help make them more readable.

Include File

Including a file will process the file, and insert the output where the include file line was in the file. The argument can be either a name of a file to find from the same directory as the currently processing file, or a path to the file to include. The file will be run through UDP before being injected.

#I name_of_file_to_use

Section Header

Section Headers are made to help break up the file, and make logical sections. These work very well when including multiple files.

See the Preprocessor Config `section-style' for style options.

#S Section Title

Toggelable Lines

Toggelable lines are used when using the UDP output type. These lines are meant to be uncommented if the conditional they are in is enabled. The lines must end with the characters X# as the last 2 characters on the line. This is meant to be used for configs that are compiled in place.

# some disabled line that will be enabled X#

required-commands

This will check the your $PATH for the semicolon seperated list of commands. If any command cannot be found in your $PATH then scripts-enabled will be set to 0, and the user will be notifed which commands are missing, and be asked if they would like to continue or abort.

This has no defaults as it acts as a directive.

#Required-commands git;which;curl

Scripts

attempts to execute script at location using bash

#$ scripts/some_script

Script Insertions

Executs the script between <# and #> with bash and puts the output into the file in place of the script tag

<# echo $USER #>

Debug Line

Debug Line directives allow you to see how the preprocessor is interperiting the file by dumiping states, or dropping into a repl.

Debug State

#?DS?#

Dump Globals

#?DG?#

Dump Processor State

#?DP?#

Interactive debugging REPL

#?DI?#

Dump Engine State

#?DE?#

Debugging Mark

#?DM?# mark name will be printed
#?DM?#the space in not needed