TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

add "not" support for alternates #365

Open xenoterracide opened 2 years ago

xenoterracide commented 2 years ago

Is your feature request related to a problem? Please describe.

I'd like to be able to negate a alternate match in the filename

Describe the solution you'd like

I think something like (and I can't believe I'm suggesting the fortran operator, but for shell safety... unless you want to parse unicode https://en.wikipedia.org/wiki/Relational_operator)

example.txt##user.NE.root

and then add it's compatriot for consistency as an alias to the current behavior

example.txt##user.EQ.root

of course this could create one problem, what if you have a pattern that has a dot in it, in that case I'd guess you'd have to do 2 things, one maybe make this a toggle feature for now, and if they do toggle it, they have to use the operator if its going to be ambiguous, or they just have to do that period. You could consider then in a next major version whether to deprecate/remove the old behavior.

Describe alternatives you've considered

obviously you can use the if/else/include pattern with a template, but that's kind of cludgy if you want the whole file

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.