F.3 Configuration management

Class: mbfl_vc_git_config_option
Superclass: mbfl_default_object
Metaclass: mbfl_default_class

Class of objects representing git configuration options; its fields are:

database

A string among: ‘local’, ‘global’, ‘system’, ‘worktree’, ‘unspecified’; it is initialised to ‘unspecified’. Notice that ‘unspecified’ is not equivalent to ‘local’.

This value is used to establish which git option to use among --local, --global, --system, --worktree; if the field value is ‘unspecified’ non of these git options is used.

key

The configuration value key.

default_value

A default value. It is used as argument to git option --default.

type

A string among: ‘bool’, ‘int’, ‘bool-or-int’, ‘path’, ‘expiry-date’, ‘colour’, ‘no-type’; it is initialised to ‘no-type’. It is used to establish the argument of the git option --type or if --no-type must be used.

terminator

A string among: ‘newline’, ‘null’; it is initialised to ‘newline’. It is used to establish whether to use git option --null.

In this documentation function arguments that are references to objects of this class are named CFGOPT.

Constructor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_define CFGOPT KEY
Constructor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_define CFGOPT KEY DEFAULT_VALUE

Initialise a new instance of mbfl_vc_git_config_option representing a configuration option with KEY.

The optional DEFAULT_VALUE represents the default value.

mbfl_default_object_declare(CFGOPT)

mbfl_vc_git_config_option_define _(CFGOPT) 'marcomaggi.package-name' 'noname'
Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_value_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_value_set CFGOPT NEW_VALUE

Accessor and mutator for the value of the configuration option.

mbfl_default_object_declare(CFGOPT)
mbfl_declare_varref(PKGNAME)

mbfl_vc_git_config_option_define _(CFGOPT) 'marcomaggi.package-name' 'noname'

mbfl_vc_git_config_option_value_var _(PKGNAME) _(CFGOPT)
print '%s' "$PKGNAME"

mbfl_vc_git_config_option_value_set _(CFGOPT) 'my-great-package'
Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_database_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_database_set CFGOPT NEW_VALUE

Accessor and mutator for the field database of mbfl_vc_git_config_option.

Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_key_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_key_set CFGOPT NEW_VALUE

Accessor and mutator for the field key of mbfl_vc_git_config_option.

Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_default_value_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_default_value_set CFGOPT NEW_VALUE

Accessor and mutator for the field default_value of mbfl_vc_git_config_option.

Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_type_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_type_set CFGOPT NEW_VALUE

Accessor and mutator for the field type of mbfl_vc_git_config_option.

Accessor on mbfl_vc_git_config_option: mbfl_vc_git_config_option_terminator_var CUR_VALUE CFGOPT
Mutator on mbfl_vc_git_config_option: mbfl_vc_git_config_option_terminator_set CFGOPT NEW_VALUE

Accessor and mutator for the field terminator of mbfl_vc_git_config_option.


This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.