Helpers for manipulating fpm command lines.
Provides utilities to split an fpm <subcmd> ... command into a prefix and
remainder, and to inject target names into the correct position while
preserving a -- delimiter for arguments passed to the executed program.
These utilities operate on plain strings and assume a space-delimited token structure. They do not implement general shell parsing.
Inject target names into a command line while respecting a -- delimiter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | prefix |
Prefix up to and including the subcommand. |
||
| character(len=*), | intent(in) | :: | rest |
Remaining arguments after the subcommand. |
||
| character(len=*), | intent(in) | :: | names |
Space-separated names to inject. |
Split a command line into <fpm subcmd> prefix and remaining arguments.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | full |
Full command string. |
||
| character(len=:), | intent(out), | allocatable | :: | prefix |
Prefix up to and including the subcommand token. |
|
| character(len=:), | intent(out), | allocatable | :: | rest |
Remaining arguments after the subcommand. |