pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
108 stars 46 forks source link

Command line - Add the `eval` option #665

Open jordanmontt opened 5 months ago

jordanmontt commented 5 months ago

It would be nice to be able to launch an image in headless mode. For example $ pharo-launcher image mySuperImage eval "2+2" and that returns a 4

guillep commented 5 months ago

Yes!

I wonder, what if instead of that we do

$ pharo-launcher image mySuperImage --headless -- args args args

and all args are sent to the image?

Also should this be headless or headful by default?

Then in that case this could be

$ pharo-launcher image mySuperImage --headless -- eval "1+1"
Bajger commented 4 months ago

Hi! @jordanmontt did you mean to be part of launch command (or even create command)? Since image command is just root for subcommands... E.g.: $ pharo-launcher image launch <myImage> --headless --eval --save "MyClass oneTimeSetup"

jordanmontt commented 4 months ago

Hello,

Yes, I was meaning what Guille said. To be able to do something like that

$ pharo-launcher image mySuperImage --headless -- args args args