[squeak-dev] The Inbox: System-dtl.1164.mcz
K K Subbu
kksubbu.ml at gmail.com
Tue Jun 9 06:16:00 UTC 2020
On 09/06/20 1:16 am, commits at source.squeak.org wrote:
> David T. Lewis uploaded a new version of System to project The Inbox:
> http://source.squeak.org/inbox/System-dtl.1164.mcz
>
> ==================== Summary ====================
>
> Name: System-dtl.1164
> Author: dtl
> Time: 8 June 2020, 9:16:15.619687 pm
> UUID: f4d402cd-389a-4600-abcb-6ba4486c07c4
> Ancestors: System-mt.1163
>
> Fix handling of the '--' command line token, and let command parameters be handled consistently by SmalltalkImage>>argumentAt:
> Discussion at http://lists.squeakfoundation.org/pipermail/squeak-dev/2020-June/209945.html
>
> =============== Diff against System-mt.1163 ===============
>
> Item was changed:
> ----- Method: SmalltalkImage>>argumentAt: (in category 'command line') -----
> argumentAt: argumentIndex
> "Answer the i-th argument of the command line, or nil if not so many argument."
> + ^ self arguments at: argumentIndex ifAbsent: [].
> + !
> - ^ self getSystemAttribute:
> - argumentIndex +
> - (Preferences readDocumentAtStartup
> - ifTrue: [ 2 ]
> - ifFalse: [ 1 ])!
+1. I never liked this preference anyway.
> Item was changed:
> ----- Method: SmalltalkImage>>arguments (in category 'command line') -----
> arguments
> "Answer an array with all the command line arguments.
> This does not include imagePath, documentPath nor any option."
>
> "Smalltalk commandLine arguments"
>
> + | args strm |t
> + args := self rawArguments.
> + (args includes: '--')
> + ifTrue: [ ^args copyAfter: self imageArgumentsMarker ].
Suggest splitting the arguments into image, first and rest. If first is
nil, then no further processing is required. If it is a chunk or project
file, then treat it as a startup script or project and pass the rest of
the command line to it.
E.g.
squeak.image playmedia.st $HOME/music/foo.mp3
squeak.image starwars.pr $HOME/background/deathstar.png
squeak.image repl.st 'Beeper beep!'
Regards .. Subbu
More information about the Squeak-dev
mailing list
|