-
Notifications
You must be signed in to change notification settings - Fork 34
CLI Method set_mutually_exclusive_groups
Stefano Zaghi edited this page Mar 23, 2016
·
2 revisions
Signature
call cli%set_mutually_exclusive_groups(group1, group2)
Set two groups of CLAs (two command) as mutually-exclusive, i.e. if one is invoked the other cannot and viceversa. All dummy arguments are required.
character(*), intent(in) :: group1 !< Name of the first grouped CLAs.
character(*), intent(in) :: group2 !< Name of the second grouped CLAs.
Note that the two groups (commands) must be defined previously the invocation of this method.
Must be used for setting two groups of CLAs (two commands ) as mutually-exclusive
use flap
type(command_line_interface):: cli
! define CLI
call cli%init(...)
! define two groups (with direct or direct methods)
call cli%add_group(group='commit', ...)
call cli%add(group='init', ...)
call cli%set_mutually_exclusive_groups(group1='commit', group2='init')
Now, it the CLI is invoked with both commit
and init
a (clear) error message is printed to stderr.
Home | About | Getting Started Guide | Usage | Copyright © 2016 szaghi