Hello Larry, thanks for pointing this out! I believe this is caused by a bug that caused extra end of line characters in certain circumstances that has now been fixed. The fix will be part of 2024.1.1 and 2024.2.0. If you have any further questions, I encourage contacting support to see if they can help.
I really enjoy taking things apart and breaking them down into basic components to see how they work. I found it useful to insert break statements in a confusing piece of code and run it from terminal (can also use the ObjectScript debugger from VS Code with breakpoints). Then I could write out the values at each break and reverse-engineer what the command/method must do. I also really enjoy the ability to drill down into the code and read the definition of a method. If you are curious how any method works you can just Ctrl+Click from VS Code to go to that method's definition(Ctrl+Shift+G from Studio).
One way I can think of is to get the name of each config item that is enabled via an SQL query such as:
SELECT Name, ClassName FROM Ens_Config.Item WHERE Production = '<production name>' and Enabled = 1
Then for each of these call ##class(Ens.Director).EnableConfigItem("<production name>||<config item name>|<config item class name>", 0)
I am not sure of any method to do it all at once.