mirror of
https://github.com/albfan/bash-ini-parser.git
synced 2025-04-19 13:22:14 +03:00
clear function
This commit is contained in:
parent
affa300da5
commit
a635d175ce
@ -94,6 +94,18 @@ function cfg_writer {
|
||||
IFS="$OLDIFS"
|
||||
}
|
||||
|
||||
function cfg_clear {
|
||||
OLDIFS="$IFS"
|
||||
IFS=' '$'\n'
|
||||
fun="$(declare -F)"
|
||||
fun="${fun//declare -f/}"
|
||||
for f in $fun; do
|
||||
[ "${f#$PREFIX}" == "${f}" ] && continue
|
||||
unset -f ${f}
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
}
|
||||
|
||||
function cfg_update {
|
||||
SECTION=$1
|
||||
VAR=$2
|
||||
|
Loading…
x
Reference in New Issue
Block a user