<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Dave!<div><br></div><div>Thanks for looking into this! :-)</div><div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">So I fixed that, thinking that I might put it in the inbox. But then I</span></div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">noticed that VM is also inconsistent with respect to passing the '--' token</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">to the image in the VM parameters.</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Well, it would be nice to also work with "/arg" not just "--arg" on the Windows CMD shell. ;-)</span></div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 08.06.2020 00:53:26 schrieb David T. Lewis <lewis@mail.msen.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">Background:<br><br>Motivated by the recent "Image not startable after save" discussion, I was<br>looking to see if there might be a way to inject a startup patch script,<br>specified as a command line option, that would be evaluated prior to any<br>of the processStartupList: processing.<br><br>That led me to notice that '--' handling in the command line is currently<br>broken in trunk (see the -help message from the VM for intended behavior).<br><br>So I fixed that, but then I noticed that argument processing was generally<br>all bolloxed up and worked inconsistently.<br><br>So I fixed that, thinking that I might put it in the inbox. But then I<br>noticed that VM is also inconsistent with respect to passing the '--' token<br>to the image in the VM parameters.<br><br>So I fixed that, thinking that I could do a pull request to opensmalltalk-vm<br>to get that resolved.<br><br>Then in noticed that the readDocumentAtStartup preference serves no useful<br>purpose once the argument processing is fixed, so I eliminated use of the<br>preference, so it can be deprecated and removed at a later date.<br><br>But in total, this is a a lot of change to something that never working<br>right in the first place, so I would like to summarize my idea of how of<br>I think it *should* work for review before posting any code. If this<br>seems reasonable, I'll put my changes in the inbox.<br><br>Here is how I think it should work, showing first a unix command line, and<br>then the expect arguments as seen in the image:<br><br>  $ squeak squeak.image -- arg1 arg2 arg3 "do not treat arg1 as a script"<br>  Smalltalk arguments ==> #('arg1' 'arg2' 'arg3')<br>  (1 to: 4) collect: [:i | Smalltalk argumentAt: i ] ==> #('arg1' 'arg2' 'arg3' nil)<br><br>  $ squeak squeak.image script.st -- arg1 arg2 arg3 "script.st runs"<br>  Smalltalk arguments ==> #('arg1' 'arg2' 'arg3')<br>  (1 to: 4) collect: [:i | Smalltalk argumentAt: i ] ==> #('arg1' 'arg2' 'arg3' nil)<br><br>  $ squeak squeak.image -- script.st arg1 arg2 arg3 "script.st does not run"<br>  Smalltalk arguments ==> #('start.st' 'arg1' 'arg2' 'arg3')<br>  (1 to: 5) collect: [:i | Smalltalk argumentAt: i ] ==> #('start.st' 'arg1' 'arg2' 'arg3' nil)<br><br>  $ squeak squeak.image script.st arg1 arg2 arg3 "script.st runs"<br>  Smalltalk arguments ==> #('arg1' 'arg2' 'arg3')<br>  (1 to: 4) collect: [:i | Smalltalk argumentAt: i ] ==> #('arg1' 'arg2' 'arg3' nil)<br><br>  $ squeak script.st arg1 arg2 arg3 ==> error image not found<br><br>  $ squeak script.st -- arg1 arg2 arg3 ==> error image not found<br><br>  "Preferred bahaviour, but VM patch required"<br>  $ squeak -- arg1 arg2 arg3 "use default image name squeak.image and no start script"<br>  Smalltalk arguments ==> #('arg1' 'arg2' 'arg3')<br>  (1 to: 4) collect: [:i | Smalltalk argumentAt: i ] ==> #('arg1' 'arg2' 'arg3' nil)<br> <br>  "Without VM patch, this is the expected (but not desirable) behavior, because<br>  the VM fails to provide '--' in vmParameters in this case only. Note that the <br>  current workaround is simply to specify the image name on the command line."<br>  $ squeak -- arg1 arg2 arg3 ==> Error: no content to install<br>  Smalltalk arguments ==> #('arg2' 'arg3')<br>  (1 to: 4) collect: [:i | Smalltalk argumentAt: i ] #('arg2' 'arg3' nil nil)<br><br>Dave<br><br></div></blockquote>
                                        </div></body>