You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like there are some envvars that split on commas, some on commas+newlines, some on commas+whitespace, and others on just whitespace. I propose replacing all of the first type with comma+whitespace splits unless they rely on newlines being retained (which I don't see being an issue). In places where commas are required (e.g. in mc-image-helper, and are they really required?), values can first be split on commas+whitespace, then re-joined on commas:
IFS=,$IFS# prepend comma to $IFS
plugins=($PLUGINS) # split on $IFS (comma+whitespace)
mc-image-helper mcopy ... "$*"# join with comma
IFS=${IFS#?}# restore $IFS
The motivation behind this issue is this snippet from my docker-compose.yml:
Yes, those need to be brought into consistency of commas or newlines. Spaces might be significant so it is harder to declare that as the ubiquitous arg delimiter. There is a constant already for comma or newline
...actually SPIGET_RESOURCES is an unusual case since that's one of the next things I want to port over to mc-image-helper. At that point, it'll get the proper comma or whitespace/newline arg delimiting support. Also, support for inline comments is actually a feature that I was discussing with someone on Discord.
Enhancement Type
Improve an existing feature
Describe the enhancement
Seems like there are some envvars that split on commas, some on commas+newlines, some on commas+whitespace, and others on just whitespace. I propose replacing all of the first type with comma+whitespace splits unless they rely on newlines being retained (which I don't see being an issue). In places where commas are required (e.g. in mc-image-helper, and are they really required?), values can first be split on commas+whitespace, then re-joined on commas:
The motivation behind this issue is this snippet from my docker-compose.yml:
Notice how I accidentally duplicated one of the plugins. Ignoring how cryptic YAML multiline indicators are, I would prefer to write this instead:
I can work on a PR for this if we're in agreement!
The text was updated successfully, but these errors were encountered: