FogBugz (Case [Issue]10654) Command Line - Add the --save option to the 'eval' command line handler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]10654) Command Line - Add the --save option to the 'eval' command line handler

Pharo Issue Tracker
A FogBugz case was opened by Damien Cassou.

Case ID:      10654
Title:        Add the --save option to the 'eval' command line handler
Status:       Work Needed
Category:     Bug
Project:      Command Line
Area:         Misc
Priority:     3 - Must Fix
Milestone:    Pharo3.0: 30/03/2014
Assigned To:  Camillo Bruni

URL:          https://pharo.fogbugz.com/default.asp?10654

In Pharo 2.0, integrating the fix for issue #10653 will result in a new --save option for the 'eval' command line handler. Even if Pharo 3.0 don't really need that thanks to its Session object, I believe it would be better to be backward compatible: command lines that work on Pharo 2.0 should also work on Pharo 3.0.

I propose to include the --save option in Pharo 3.0. The code needed to do that is simple.

In EvaluateCommandLineHandler>>activate: replace "self quit" by

(self hasOption: 'save')
ifTrue: [ Smalltalk snapshot: true andQuit: true ]
ifFalse: [ self quit ]

In EvaluateCommandLineHandler>>evaluateArguments, replace "args := self arguments joinUsing: Character space." by

args := ((self arguments size > 1 and: [ self arguments first = '--save' ])
ifTrue: [ self arguments allButFirst ]
ifFalse: [ self arguments ]) joinUsing: Character space.

It's Camillo's code, that's why it's ugly :-D


You are subscribed to this case.  If you do not want to receive automatic notifications in the future, unsubscribe (https://pharo.fogbugz.com/default.asp?pre=preUnsubscribe&pg=pgEditBug&command=view&ixBug=10654) from this case.

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker