flap_save_bash_completion Program

Uses

  • program~~flap_save_bash_completion~~UsesGraph program~flap_save_bash_completion flap_save_bash_completion module~flap flap program~flap_save_bash_completion->module~flap penf penf program~flap_save_bash_completion->penf module~flap_command_line_argument_t flap_command_line_argument_t module~flap->module~flap_command_line_argument_t module~flap_command_line_arguments_group_t flap_command_line_arguments_group_t module~flap->module~flap_command_line_arguments_group_t module~flap_command_line_interface_t flap_command_line_interface_t module~flap->module~flap_command_line_interface_t module~flap_command_line_argument_t->penf module~face face module~flap_command_line_argument_t->module~face module~flap_object_t flap_object_t module~flap_command_line_argument_t->module~flap_object_t module~flap_utils_m flap_utils_m module~flap_command_line_argument_t->module~flap_utils_m module~flap_command_line_arguments_group_t->penf module~flap_command_line_arguments_group_t->module~flap_command_line_argument_t module~flap_command_line_arguments_group_t->module~face module~flap_command_line_arguments_group_t->module~flap_object_t module~flap_command_line_interface_t->penf module~flap_command_line_interface_t->module~flap_command_line_argument_t module~flap_command_line_interface_t->module~flap_command_line_arguments_group_t module~flap_command_line_interface_t->module~face module~flap_command_line_interface_t->module~flap_object_t module~flap_command_line_interface_t->module~flap_utils_m iso_fortran_env iso_fortran_env module~face->iso_fortran_env module~flap_object_t->penf module~flap_object_t->iso_fortran_env module~flap_utils_m->penf

Test save_bash_completion method.


Calls

program~~flap_save_bash_completion~~CallsGraph program~flap_save_bash_completion flap_save_bash_completion proc~add_group flap_command_line_interface_t::command_line_interface%add_group program~flap_save_bash_completion->proc~add_group proc~add~2 flap_command_line_interface_t::command_line_interface%add program~flap_save_bash_completion->proc~add~2 proc~init flap_command_line_interface_t::command_line_interface%init program~flap_save_bash_completion->proc~init proc~parse~2 flap_command_line_interface_t::command_line_interface%parse program~flap_save_bash_completion->proc~parse~2 proc~save_bash_completion flap_command_line_interface_t::command_line_interface%save_bash_completion program~flap_save_bash_completion->proc~save_bash_completion proc~assign_object flap_object_t::object%assign_object proc~add_group->proc~assign_object proc~is_defined_group flap_command_line_interface_t::command_line_interface%is_defined_group proc~add_group->proc~is_defined_group proc~set_examples flap_object_t::object%set_examples proc~add_group->proc~set_examples proc~add~2->proc~add_group proc~add flap_command_line_arguments_group_t::command_line_arguments_group%add proc~add~2->proc~add proc~add~2->proc~assign_object proc~check~2 flap_command_line_argument_t::command_line_argument%check proc~add~2->proc~check~2 proc~add~2->proc~is_defined_group proc~upper_case flap_utils_m::upper_case proc~add~2->proc~upper_case proc~init->proc~assign_object proc~init->proc~set_examples proc~parse~2->proc~add~2 none~get_args flap_command_line_interface_t::command_line_interface%get_args proc~parse~2->none~get_args proc~check_m_exclusive~2 flap_command_line_interface_t::command_line_interface%check_m_exclusive proc~parse~2->proc~check_m_exclusive~2 proc~check~3 flap_command_line_interface_t::command_line_interface%check proc~parse~2->proc~check~3 proc~is_defined~2 flap_command_line_interface_t::command_line_interface%is_defined proc~parse~2->proc~is_defined~2 proc~is_required_passed flap_command_line_arguments_group_t::command_line_arguments_group%is_required_passed proc~parse~2->proc~is_required_passed proc~parse flap_command_line_arguments_group_t::command_line_arguments_group%parse proc~parse~2->proc~parse proc~print_version flap_object_t::object%print_version proc~parse~2->proc~print_version proc~sanitize_defaults flap_command_line_arguments_group_t::command_line_arguments_group%sanitize_defaults proc~parse~2->proc~sanitize_defaults proc~save_usage_to_markdown flap_command_line_interface_t::command_line_interface%save_usage_to_markdown proc~parse~2->proc~save_usage_to_markdown proc~usage~3 flap_command_line_interface_t::command_line_interface%usage proc~parse~2->proc~usage~3 proc~signature flap_command_line_arguments_group_t::command_line_arguments_group%signature proc~save_bash_completion->proc~signature proc~get_args_from_invocation flap_command_line_interface_t::command_line_interface%get_args_from_invocation none~get_args->proc~get_args_from_invocation proc~get_args_from_string flap_command_line_interface_t::command_line_interface%get_args_from_string none~get_args->proc~get_args_from_string proc~check flap_command_line_arguments_group_t::command_line_arguments_group%check proc~add->proc~check proc~check_m_exclusive~2->proc~is_defined_group proc~raise_error_m_exclude flap_command_line_arguments_group_t::command_line_arguments_group%raise_error_m_exclude proc~check_m_exclusive~2->proc~raise_error_m_exclude proc~check_action_consistency flap_command_line_argument_t::command_line_argument%check_action_consistency proc~check~2->proc~check_action_consistency proc~check_envvar_consistency flap_command_line_argument_t::command_line_argument%check_envvar_consistency proc~check~2->proc~check_envvar_consistency proc~check_m_exclude_consistency flap_command_line_argument_t::command_line_argument%check_m_exclude_consistency proc~check~2->proc~check_m_exclude_consistency proc~check_named_consistency flap_command_line_argument_t::command_line_argument%check_named_consistency proc~check~2->proc~check_named_consistency proc~check_optional_consistency flap_command_line_argument_t::command_line_argument%check_optional_consistency proc~check~2->proc~check_optional_consistency proc~check_positional_consistency flap_command_line_argument_t::command_line_argument%check_positional_consistency proc~check~2->proc~check_positional_consistency proc~check~3->proc~is_defined_group proc~check~3->proc~check proc~is_defined~2->proc~is_defined_group proc~is_defined flap_command_line_arguments_group_t::command_line_arguments_group%is_defined proc~is_defined~2->proc~is_defined proc~is_required_passed~2 flap_command_line_argument_t::command_line_argument%is_required_passed proc~is_required_passed->proc~is_required_passed~2 proc~usage flap_command_line_arguments_group_t::command_line_arguments_group%usage proc~is_required_passed->proc~usage proc~parse->proc~add proc~parse->proc~assign_object proc~parse->proc~sanitize_defaults cton cton proc~parse->cton proc~check_m_exclusive flap_command_line_arguments_group_t::command_line_arguments_group%check_m_exclusive proc~parse->proc~check_m_exclusive proc~parse->proc~is_defined proc~raise_error_duplicated_clas flap_command_line_argument_t::command_line_argument%raise_error_duplicated_clas proc~parse->proc~raise_error_duplicated_clas proc~raise_error_nargs_insufficient flap_command_line_argument_t::command_line_argument%raise_error_nargs_insufficient proc~parse->proc~raise_error_nargs_insufficient proc~raise_error_switch_unknown flap_command_line_argument_t::command_line_argument%raise_error_switch_unknown proc~parse->proc~raise_error_switch_unknown proc~raise_error_value_missing flap_command_line_argument_t::command_line_argument%raise_error_value_missing proc~parse->proc~raise_error_value_missing proc~sanitize_defaults~2 flap_command_line_argument_t::command_line_argument%sanitize_defaults proc~sanitize_defaults->proc~sanitize_defaults~2 proc~save_usage_to_markdown->proc~usage~3 proc~signature~3 flap_command_line_interface_t::command_line_interface%signature proc~save_usage_to_markdown->proc~signature~3 strz strz proc~save_usage_to_markdown->strz proc~signature~2 flap_command_line_argument_t::command_line_argument%signature proc~signature->proc~signature~2 proc~usage~3->proc~signature~3 proc~usage~3->proc~usage proc~check->proc~is_defined proc~errored flap_command_line_arguments_group_t::command_line_arguments_group%errored proc~check->proc~errored proc~errored~2 flap_command_line_argument_t::command_line_argument%errored proc~check_action_consistency->proc~errored~2 proc~check_envvar_consistency->proc~errored~2 proc~check_m_exclude_consistency->proc~errored~2 proc~is_passed flap_command_line_arguments_group_t::command_line_arguments_group%is_passed proc~check_m_exclusive->proc~is_passed proc~raise_error_m_exclude~2 flap_command_line_argument_t::command_line_argument%raise_error_m_exclude proc~check_m_exclusive->proc~raise_error_m_exclude~2 proc~check_named_consistency->proc~errored~2 proc~check_optional_consistency->proc~errored~2 proc~check_positional_consistency->proc~errored~2 proc~get_clasg_indexes flap_command_line_interface_t::command_line_interface%get_clasg_indexes proc~get_args_from_invocation->proc~get_clasg_indexes proc~get_args_from_string->proc~get_clasg_indexes proc~tokenize flap_utils_m::tokenize proc~get_args_from_string->proc~tokenize proc~is_required_passed~2->proc~errored~2 proc~raise_error_duplicated_clas->proc~errored~2 proc~raise_error_m_exclude->proc~errored proc~raise_error_nargs_insufficient->proc~errored~2 proc~raise_error_switch_unknown->proc~errored~2 proc~raise_error_value_missing->proc~errored~2 proc~replace_all flap_utils_m::replace_all proc~sanitize_defaults~2->proc~replace_all proc~unique flap_utils_m::unique proc~sanitize_defaults~2->proc~unique proc~wstrip flap_utils_m::wstrip proc~sanitize_defaults~2->proc~wstrip proc~signature~2->cton proc~has_choices flap_command_line_argument_t::command_line_argument%has_choices proc~signature~2->proc~has_choices str str proc~signature~2->str proc~signature~3->proc~signature proc~usage->proc~signature proc~usage~2 flap_command_line_argument_t::command_line_argument%usage proc~usage->proc~usage~2 proc~errored->str interface~colorize face::colorize proc~errored->interface~colorize proc~print_error_message flap_object_t::object%print_error_message proc~errored->proc~print_error_message proc~errored~2->str proc~errored~2->interface~colorize proc~errored~2->proc~print_error_message proc~get_clasg_indexes->proc~is_defined_group proc~raise_error_m_exclude~2->proc~errored~2 proc~replace_all->proc~wstrip proc~replace flap_utils_m::replace proc~replace_all->proc~replace proc~usage~2->cton proc~usage~2->proc~replace_all proc~usage~2->str proc~usage~2->interface~colorize proc~colorize_default face::colorize_default interface~colorize->proc~colorize_default proc~color_index face::color_index proc~colorize_default->proc~color_index proc~style_index face::style_index proc~colorize_default->proc~style_index proc~upper face::upper proc~colorize_default->proc~upper

Variables

Type Attributes Name Initial
type(command_line_interface) :: cli

Command Line Interface (CLI).

character(len=37) :: bash_file = 'flap_test_save_bash_completion.bash'

Bash script file name.


Source Code

program flap_save_bash_completion
!< Test `save_bash_completion` method.

use flap, only : command_line_interface
use penf

implicit none
type(command_line_interface) :: cli                                             !< Command Line Interface (CLI).
character(37)                :: bash_file='flap_test_save_bash_completion.bash' !< Bash script file name.

call cli%init(progname='flap_test_save_bash_completion')
call cli%add(switch_ab='-b',  required=.false., act='store', def='no', choices='yes,no')
call cli%add_group(group='compile', description='compile sources')
call cli%add_group(group='clean',   description='clean compiled objects')
call cli%add(group='compile', switch='--compiler',  switch_ab='-c',  required=.false., act='store',      def='gnu'                 )
call cli%add(group='compile', switch='--flags',     switch_ab='-f',  required=.false., act='store',      def='-O2'                 )
call cli%add(group='clean',   switch='--clean',     switch_ab='-c',  required=.false., act='store_true', def='.false.'             )
call cli%add(group='clean',   switch='--clean-all', switch_ab='-ca', required=.false., act='store_true', def='.false.'             )
call cli%add(group='compile', positional=.true., position=1,         required=.false.,                   def='1.0'                 )
call cli%add(group='compile', switch='--integer',   switch_ab='-i',  required=.false., act='store',      def='1',   choices='1,3,5')
call cli%add(group='compile', switch='--real',                       required=.false., act='store',      def='1.0', choices='1.,2.')
call cli%parse
call cli%save_bash_completion(bash_file=trim(bash_file))
endprogram flap_save_bash_completion