From 5635aa0fe22734cd4330eb4aa330b60d2e1b109f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 27 Feb 2021 13:13:55 +0100 Subject: Remove -e flag, remove long options, start rewriting in C, add support for changing shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- README | 60 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 27 deletions(-) (limited to 'README') diff --git a/README b/README index a703e75..ec06c25 100644 --- a/README +++ b/README @@ -2,15 +2,18 @@ NAME gpp - Bash-based preprocessor for anything SYNOPSIS - gpp [OPTION]... + gpp [-D name[=value]] [-f file | [-i input-file] + [-o output-file]] [-n count] [-s symbol] [-u [-u]] + [shell [argument] ...] ETYMOLOGY gpp stands for General Preprocessor. DESCRIPTION gpp lets a developer embed directives written in GNU - Bash into any text document. These directives are used - to automate the writting of parts of the document. + Bash (this can be changed) into any text document. + These directives are used to automate the writting of + parts of the document. The preprocessing directives start with a symbol (or text string) specified by the developer. By default @@ -41,40 +44,43 @@ DESCRIPTION echo verbatim. OPTIONS - -s, --symbol SYMBOL - Set the prefix symbol for preprocessor directives. - Defaults to @. + -D name=value + Set the environment variable name to hold + the value value. - -e, --encoding ENCODING - Specifies the encoding of the file. - - -n, --iterations N - Process the file recursively N times. Defaults to 1 time. + -D name + Set the environment variable name to hold + the value 1. - -u, --unshebang - Clear the shebang line, remove it if this flag - is used twice. If used twice, an empty line - will be inserted after the new first line. + -f file + Equivalent to -i FILE -o FILE. - -i, --input FILE + -i input-file Select file to process. Defaults to /dev/stdin. - -o, --output FILE + -n count + Process the file recursively count times. + Defaults to 1 time. + + -o output-file Select output file. Defaults to /dev/stdout. - -f, --file FILE - Equivalent to -i FILE -o FILE. + -s symbol + Set the prefix symbol for preprocessor directives. + Defaults to @. - -D, --export NAME=VALUE - Set the environment variable NAME to hold - the value VALUE. + -u + Clear the shebang line, remove it if this flag + is used twice. If used twice, an empty line + will be inserted after the new first line. - -D, --export NAME - Set the environment variable NAME to hold - the value 1. +OPERANDS + shell + The shell to run instead of bash. The shell + must be compatible with POSIX shell. - Short options must be joined. The value of a flag must - be in a separate argument from the flag itself. + argument ... + Command line arguments for the shell. EXAMPLES Conditional hello world -- cgit v1.2.3-70-g09d2