Skip to content

Commit

Permalink
cqfd: split space removal into two variable expansions
Browse files Browse the repository at this point in the history
The removal of tabulation arround the sign = is perform by two variable
expansions:
 - remove tabulation before the sign =
 - remove tabulation after the sign =

This applies the same procedure to space by splitting the single removal
into two variable expansions: one before the sign =, one after the sign
=.
  • Loading branch information
gportay committed Feb 27, 2025
1 parent 81dd8eb commit 6123cbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion support/cqfd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ cfg_parser ()
ini=( ${ini[*]//;*/} ) # remove comments with ;
ini=( ${ini[*]/\ =/=} ) # remove tabs before =
ini=( ${ini[*]/=\ /=} ) # remove tabs after =
ini=( ${ini[*]/\ =\ /=} ) # remove anything with a space around =
ini=( ${ini[*]/\ =/=} ) # remove space before =
ini=( ${ini[*]/=\ /=} ) # remove space after =
ini=( ${ini[*]/#\\[/\}$'\n'cfg.section.} ) # set section prefix
ini=( ${ini[*]/%\\]/ \(} ) # convert text2function (1)
ini=( ${ini[*]/=/=\( } ) # convert item to array
Expand Down

0 comments on commit 6123cbd

Please sign in to comment.