As far as I see it, you use the two in distinct cases:
- save alone is exclusively used for copying an image. There is no point in
no quitting in this case.
- execution+save is used either to start a server process (hence noquit is
desired), or to setup an image (hence, quit is desired). I think favoring
the server process is possibly the more common case. On the other hand, you
are right in that it is not uniform with respect to the first case, but I
think it is not unreasonable.

Doru



On Tue, Feb 18, 2014 at 3:55 PM, Sebastian Sastre <
[email protected]> wrote:

> true Tudor.
>
> Do you know why the default behaviour is inverted for that case?
>
> sebastian <https://about.me/sebastianconcept>
>
> o/
>
>
>
>
>
> On Feb 18, 2014, at 11:47 AM, Tudor Girba <[email protected]> wrote:
>
> You can find the answer to your question in the class comment:
>
> Usage: st [--help] [ --quit ] <FILE>
> --help    list this help message
>  --quit    if specified, the image exits without saving after evaluating
> FILE
> --save    if specified, save the image after evaluating FILE
>  <FILE>    a file containing valid Pharo expressions
>
> Documentation:
> The ST command line handler runs Pharo code stored in a file without
> quiting.
>
> Example:
>
> pharo Pharo.image st code.st
>  # By default files ending in .st are recognized and evaluated
> pharo Pharo.image code.st
>
> Doru
>
>
>
> On Tue, Feb 18, 2014 at 3:27 PM, Sebastian Sastre <
> [email protected]> wrote:
>
>> Hi there,
>>
>> can someone clarify this for me?
>>
>> lets say you execute in the terminal:
>>
>> pharo-vm-nox some.image save awesome.image --delete-old
>>
>> it starts, saves the image and deletes the old one and quits returning
>> control to terminal
>>
>> but if you do:
>>
>> pharo-vm-nox some.image ImageBuilder.st save awesome.image --delete-old
>>
>> it stays forever open
>>
>> I was taking a look at this but what is 'quit' option? can someone
>> explain the behaviour of this please?
>>
>> STCommandLineHandler>>end
>>         | quit  |
>>
>>         quit := self commandLine hasOption: 'quit'.
>>
>>         (self commandLine hasOption: 'save')
>>                 ifTrue: [ Smalltalk snapshot: true andQuit: quit ].
>>
>>         quit
>>                 ifTrue: [ self exitSuccess ].
>>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to