You've already forked bash-ini-parser
mirror of
https://github.com/albfan/bash-ini-parser.git
synced 2025-08-04 19:42:06 +03:00
Remove hashtag comments
This commit is contained in:
committed by
Alberto Fanjul
parent
86622e1cbe
commit
871153778b
@@ -30,6 +30,8 @@ function cfg_parser {
|
||||
debug
|
||||
ini=( ${ini[*]//;*/} ) # remove comments with ;
|
||||
debug
|
||||
ini=( ${ini[*]//\#*/} ) # remove comments with #
|
||||
debug
|
||||
ini=( ${ini[*]/#+([[:space:]])/} ) # remove init whitespace
|
||||
debug "whitespace around"
|
||||
ini=( ${ini[*]/*([[:space:]])=*([[:space:]])/=} ) # remove whitespace around =
|
||||
|
Reference in New Issue
Block a user