3

I'm having trouble figuring out how to pass arguments to a an object in the pharo image via the command line.

I know how to start the image from the command line by

pharovm image.image

But how can I register an object to respond to the next arguments that would be passed?

pharovm image.image do something

  • 1
    see this post, https://stackoverflow.com/questions/17256534/is-it-possible-to-run-smalltalk-scripts-from-the-command-line – Zeppi Oct 04 '22 at 11:02
  • Perfect that's just what I was looking for thanks! – Nicholas Greensmith Oct 04 '22 at 11:09
  • Does this answer your question? [Is it possible to run Smalltalk scripts from the command line?](https://stackoverflow.com/questions/17256534/is-it-possible-to-run-smalltalk-scripts-from-the-command-line) – Amos M. Carpenter Oct 04 '22 at 11:58
  • Do you are found answer in https://stackoverflow.com/questions/17256534/is-it-possible-to-run-smalltalk-scripts-from-the-command-line ? – Zeppi Nov 17 '22 at 10:45

1 Answers1

0

You can use CLAP library, that would support CLI parameters: https://github.com/pharo-contributions/clap-st

Then you can run something like ./pharovm --headless pharo.image clap yourCommand yourParameter

Be1dzr
  • 76
  • 2