What I would like:
{
"caption": "Regex: My Non-Scoped Replacements",
"command": "reg_replace",
"args": { "replacements": ["step1_singlepass", "step2_multipass", "step3_singlepass"] }
}
Steps 1 and 3 are assumed to meant to be a single-pass and Step 2 is assumed to be multi-pass. However, unless you're targeting a scope, this doesn't work because multi_pass on a replacement requires scope to be defined.
And if you do:
{
"caption": "Regex: My Non-Scoped Replacements",
"command": "reg_replace",
"args": { "replacements": ["step1_singlepass", "step2_multipass", "step3_singlepass"], "multi_pass": true }
}
... this makes Step 1 and Step 3 multi-pass, which will mess up my operation.
Right now, I have to split this into 3 separate commands or do something more complicated.
If you could allow multi_pass to be definable for all replacements, that'd be great.
As for how it would work when using the command-level multi_pass, maybe make it so if it's defined in replacements, it will override whatever it's set to. So, you could define multi_pass: false to make it so a replacement in a command that uses multi_pass: true only runs a single pass. Or, I guess you could do it the other way around where the command-level multi_pass takes precedence, though I think that wouldn't be as useful.
What I would like:
{ "caption": "Regex: My Non-Scoped Replacements", "command": "reg_replace", "args": { "replacements": ["step1_singlepass", "step2_multipass", "step3_singlepass"] } }Steps 1 and 3 are assumed to meant to be a single-pass and Step 2 is assumed to be multi-pass. However, unless you're targeting a scope, this doesn't work because
multi_passon a replacement requiresscopeto be defined.And if you do:
{ "caption": "Regex: My Non-Scoped Replacements", "command": "reg_replace", "args": { "replacements": ["step1_singlepass", "step2_multipass", "step3_singlepass"], "multi_pass": true } }... this makes Step 1 and Step 3 multi-pass, which will mess up my operation.
Right now, I have to split this into 3 separate commands or do something more complicated.
If you could allow
multi_passto be definable for all replacements, that'd be great.As for how it would work when using the command-level
multi_pass, maybe make it so if it's defined in replacements, it will override whatever it's set to. So, you could definemulti_pass: falseto make it so a replacement in a command that usesmulti_pass: trueonly runs a single pass. Or, I guess you could do it the other way around where the command-levelmulti_passtakes precedence, though I think that wouldn't be as useful.