BSFL  0.1.0
Bash Shell Function Library
 All Files Functions Variables Groups
Functions
Variable

Functions

 defined (variable)
 Tests if a variable is defined. More...
 
 has_value (variable)
 Tests if a variable has a value. More...
 
 option_enabled (variable)
 Checks if a variable is set to "y" or "yes". More...
 

Detailed Description

Function Documentation

defined ( variable  )

Tests if a variable is defined.

Parameters
variableVariable to test.
Return values
0if the variable is defined.
1in others cases.
has_value ( variable  )

Tests if a variable has a value.

Parameters
variableVariable to operate on.
Return values
0if the variable is defined and if value's length > 0.
1in others cases.
option_enabled ( variable  )

Checks if a variable is set to "y" or "yes".

Useful for detecting if a boolean configuration option is set or not.

Parameters
variableVariable to test.
Return values
0if the variable is set to "y" or "yes".
1in others cases.