Parse CLI arguments and build the full watcher configuration.
Produces a watch_config_t:
- cfg%w contains watcher options (polling, debounce, flags, etc.)
- cfg%settings holds the typed fpm settings for the selected subcommand
- cfg%fpm_cmdline is the effective command string
- cfg%cmd_prefix and cfg%cmd_rest are helper fields used to inject
target names into run/test commands.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_config_t), | intent(out) | :: | cfg |
subroutine parse_cli_config(cfg) use watch_cmdsplice, only: split_cmd_after_subcmd type(watch_config_t), intent(out) :: cfg character(len=:), allocatable :: fpm_cmdline class(fpm_build_settings), allocatable :: settings character(len=:), allocatable :: subcmd call parse_cli(cfg%w, settings, fpm_cmdline, subcmd) cfg%fpm_cmdline = fpm_cmdline cfg%subcmd = subcmd call move_alloc(settings, cfg%settings) call split_cmd_after_subcmd(cfg%fpm_cmdline, cfg%cmd_prefix, cfg%cmd_rest) end subroutine parse_cli_config