[squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource
stes@PANDORA.BE
stes at telenet.be
Wed Dec 2 07:12:05 UTC 2020
-----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
|