admin wrote:Hard-coded because this is the only way to ensure that script exchange between users works.
I tend to disagree here, with this statement and with the solution...
With the statement, because settings don't have to be hard-coded, it could rely on the script (and its author). I hear you say that if one don't think that he needs to make sure some option is enabled or disabled, because it's set that way on his own config, he'll then write an "incorrect" script, but that's just one of many ways one could write such a (bad) script.
Here's another one : if I assume that because I always sort by Name asc everyone else does too, so I forget to put a "::sortby name, a" on my script.
I also don't really like this solution, because it sounds like an option I'd have to enable so my scripts are using this "compatibility mode", but since that means a change of option, it is also likely to mean a refresh of List and Tree as well if/since my own options aren't the same. (eg. I don't show floppy drives)
So that could/would slow down my scripts, whenever I use them, even if there's only one for which this mode is actually required and one I use rarely. (Or I could not activate this mode, but would have to remember to enable it when needed...)
I know I keep going back there, but I feel like the ability for a script to change settings would be best because it allows the script to ensure what whatever settings should be set a specific way will be set as they should, and XY could remember which settings are changed & restore their previous values when the script execution ends.
What could be
added to this would be, why not, such a "compatibility mode" that could be enabled by the user (who wants to feel safe), or by the script itself (since a single "use_compatibility" might be easier than a bunch of "set_settting <name>, <value>" - although the later ensures that only required settings are affected)
Plus, what if for one script someone whishes that an option could be set to another value than the factory default/compatibility mode value (like don't show any hidden/system items) ??