boredzo

Also @boredzo@mastodon.social.

Breaker of binaries. Sweary but friendly. See also @TheMatrixDotGIF and @boredzo-kitchen-diary.


posts from @boredzo tagged #MPW: Macintosh Programmer's Workshop

also:

NireBryce
@NireBryce

2023 needs to be the last year linux shells let you print 'try using "<command> -h" for more information' and instead everything going forward just, by default, prints -h

and only as a stopgap measure. all of -h should just be listed when I hit tab after a -. even if my completions dir is fucked up to hell and back.


ireneista
@ireneista

and also we should have this information encoded in the binary in a machine-readable way so the shell can get it out in structured form. but that may not be a 2023 thing


boredzo
@boredzo

Commando was a feature in Apple's Macintosh Programmer's Workshop for classic Mac OS. Normally, MPW worksheets were basically a merger of command line and text file; you could edit text freely, but if you pressed ⌘-Return (or Enter if you had an extended keyboard) at the end of a line, it'd run the line as a command line and insert its output beneath it.

If you added Option (so Option-Enter or ⌘-Option-Return), it'd instead run a different command called Commando, with your command as its argument. Commando would then present a dialog box where you could configure the arguments to the command graphically, and show you a preview of the final command line at the bottom for you to OK or cancel.

I'm not well-versed in how to add support for Commando to an MPW command but a major piece of it is creating 'cmdo' resources, presumably saved in the resource fork of the command's executable.

(Note that just building a successor to Commando wouldn't be enough; there would also need to be some substitute for 'cmdo' resources, including a convention for where neo-Commando should look for them, and ideally shell support for the option-enter trick.)


 
Pinned Tags