Arguments¶
A combination of 2 sorts of syntax is used for the parsing.
Fish Built-in¶
Built-in data-structures parsed by Fish, for helpText.
Features¶
- Familiar
- Evaluated even before passed the actual program by the shell
- Multiple equifinal ways
Usage: Arguments¶
Currently, there is only one positional argument, so the order of the arguments doesn't matter (regardless of type)
Positional¶
Simply pass the string after the Base Command.
Flags¶
Optional arguments which modify the behavior of the command.
Value-less¶
Flags that don't accept or require a value can simply be passed like Positional arguments — with the limitation that each flag must be passed before -- is.
Value¶
One or more strings requseted by the flag
Single¶
If the flag accepts a single value, use the flag once. Multiple uses overwrite the previous value.
Multiple¶
Instead of passing the flag multiple times, you can simply use {} with the , delimeter to pass multiple values.
…) contain the Self-parsed Syntax.
Self-parsed¶
Syntax for data-structures not built-in in Fish.
Usage¶
Here's how you can use the self-parsed syntax to pass the header and descriptions for each of the switches
Common¶
The header and the descriptions are separated by |.
Dimmed Puntuation
The punctuation (; , .) in the descriptions on each of the switches is automatically dimmed
Features¶
- Limited
- The syntax parsed by the program itself only includes division of certain sections in the text; this is because most of the parsing is handled by built-in Fish data-structures.
- Inescapable
- The only escaping possible in the self-parsed syntax is
|splitting and+prefixes (in case of fixed number of arguments) in headers; these are very unlikely to literally appear in those, and hence, escaping is not an option.