Skip to content

CLI Method run_command

Stefano Zaghi edited this page Mar 23, 2016 · 2 revisions

run_command

Signature

is_run =  cli%run_command(group)
Meaning

Inquire if a CLAs group (a command) has been actually passed to the CLI.

Dummy arguments
character(*), intent(in) :: group !< Name of group (command) of CLA.

Note that this is a pure function.

Usage

Must be used for inquiring if a CLAs group (command) has been actually passed to the CLI

use flap

type(command_line_interface):: cli

! define CLI
call clI%init(...)
call clI%add(...)
call clI%parse(...)

if (cli%run_command(group='commit')) then
  ! do your commit stuffs
endif
Clone this wiki locally