sarbian/ModuleManager

target keys based on their value

Opened this issue · 0 comments

I was thinking that it could be useful to have a way to target a key based on its value

let's say we have a node that looks like this:

BASKET
{
    fruit = banana
    fruit = blueberry
    fruit = lemon
}

and a patch that looks like this:

@BASKET
{
    @fruit:IS[lemon] = orange
    !fruit:IS[banana] = DEL
}

to get this output:

BASKET
{
    fruit = blueberry
    fruit = orange
}

also, having support for wildcard characters and math would be awesome, so you could do :IS[*berry] or :IS[>0]
stuff like that

I could look into implement this myself, but I'm scared by MM code xD

so for now I'm putting the idea out there to see what ppl think about it