Unlike getDotenvCliOptions2Options's vars normalization (which
de-duplicates pairs into an object), this keeps the full ordered list,
including duplicates, so a caller that needs to collect several values for
one key (e.g. a plugin's --vars VAR=keyName option collecting several
key names under VAR) can do so.
Split a
--vars-style string into ordered[key, value]pairs, keeping every occurrence of a repeated key.The string is first split into pairs with VarsSyntax.varsDelimiter / VarsSyntax.varsDelimiterPattern (default: a single space), then each pair is split at its first assignor with VarsSyntax.varsAssignor / VarsSyntax.varsAssignorPattern (default:
'='), so the value may itself contain the assignor. A pair with no assignor yieldsundefinedfor its value, and a pair with an empty key is dropped.Unlike getDotenvCliOptions2Options's
varsnormalization (which de-duplicates pairs into an object), this keeps the full ordered list, including duplicates, so a caller that needs to collect several values for one key (e.g. a plugin's--vars VAR=keyNameoption collecting several key names underVAR) can do so.