[squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource
David T. Lewis
lewis at mail.msen.com
Sun Dec 6 15:03:25 UTC 2020
David,
I added your enhancements in DoItFirst-System-Support-dtl.15 on SqueakSource:
DoItFirst image arguments:
--doit argumentlist "evaluate each argument as a doIt expression"
--evaluate arg "evaluate arg, print result then exit"
--file filename "evaluate contents of filename, print result then exit"
--filein filelist "file in each file named in fileList"
--cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options"
--debug "enter a debugger as soon as possible in the startUp processing"
--help "print this message"
some arguments have single character synonyms, -f is a synonym for --file, -d for --doit
single '-' may be used instead of '--', -help is interpreted as --help
Dave
On Sat, Dec 05, 2020 at 03:56:41PM -0500, David T. Lewis wrote:
> Hi David,
>
> These are very good suggestions, sorry I did not reply earlier.
>
> It sounds like a good Sunday Squeaker project for tomorrow after
> I get a good pot of coffee going :-)
>
> Thanks,
> Dave
>
> On Wed, Dec 02, 2020 at 08:12:05AM +0100, stes at PANDORA.BE wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> >
> > I've a request for enhancement.
> >
> > I like the DoItFirst package, but I think there should be -f option,
> > like in AWK to read from a source file.
> >
> > For example:
> >
> > bash-4.4$ squeak squeak.image -- -help
> > DoItFirst image arguments:
> > -doit argumentlist "evaluate each argument as a doIt expression"
> > -evaluate arg "evaluate arg, print result then exit"
> > -filein filelist "file in each file named in fileList"
> > -cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options"
> > -debug "enter a debugger as soon as possible in the startUp processing"
> > -help "print this message"
> >
> > bash-4.4$ cat loop.st
> > |cltn index|
> > cltn _ OrderedCollection new.
> > index _ 1.
> > [index <= 10] whileTrue: [cltn add: index. index _ index + 1].
> > cltn
> >
> > bash-4.4$ squeak squeak.image -- -evaluate "`cat loop.st`"
> > an OrderedCollection(1 2 3 4 5 6 7 8 9 10)
> >
> > What I'd propose is to add a -f which is like -evaluate and the 'cat'.
> >
> > bash-4.4$ squeak squeak.image -- -f loop.st
> > an OrderedCollection(1 2 3 4 5 6 7 8 9 10)
> >
> > As far as I can see the DoItFirst package does not have this, because -filein
> > is not quite the same.
> >
> > When I try
> > bash-4.4$ squeak squeak.image -- -filein loop.st
> >
> > that doesn't work. So a -f option would be nice,
> > or is there a solution that I don't see ?
> >
> > Also a short name like -c or -e as a shortcut for -evaluate would be nice.
> >
> > In any case, I've tried DoItFirst both with the squeak-4 from subversion,
> > and the squeak-5 from OpenSmalltalk (Cog VM and Stack VM release 5.0 with
> > Squeak6.0alpha images) and the DoItFirst package seems to work fine.
> >
> > Regards,
> > David Stes
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v2
> >
> > iQEcBAEBCAAGBQJfxz3AAAoJEAwpOKXMq1MaqY4IAI2Rdesu6SKMpXlMdbPrAHSB
> > YxSkjICNFRY+0TF8irelEU4UhLOn8Rap7xKjD7ZmbvD4Q0TKxys0fMAYw2F9jjvD
> > gNIvx7I4GcfGdH14QEmyNAUdEt0Rv88uReeZcoJxY54ycQuoEveeAGeMID5e38kw
> > UDZ25WIX0l4/dKmblkAHrgwVfoKUr2ukOdSr2VsusE8Gc34+mvsNx93U1VNpBrgi
> > EOWRq6r2FsqHmCfdvoW3H9FgnUYL80c0nRftLdU7EKZXdZTTWL1dclyckmVLTHqd
> > pPO3UxXrluvAk+VqtvxsMLqFoiJdYhp9080FGAMJZh2LnLfhZy7aXbSaRF02KV4=
> > =5Mia
> > -----END PGP SIGNATURE-----
> >
>
More information about the Squeak-dev
mailing list
|