News for hackers. Stuff that matters.
Re:Installing A/UX on the Quadra 610 (2018) by tzs on Thursday December 26, 2019 @12:40AM (#21882209)
One thing from A/UX that would be nice to add to the GUIs of current Unix/Linux systems is Commando. Commando was a nifty thing in the terminal program under the System 7 environment [1].

If you typed the name of a command, such as ls or sort or cc, and then typed an ellipsis (…) it invoked Commando which would put up a dialog box for constructing the command.

The dialog box would have check boxes or radio buttons for the various available flags, text boxes for arguments, buttons to invoke file choosers for stdin, stdout, and stderr, and probably more that I'm forgetting. These things would be organized into sensible groups.

For complex commands like cc, there would be buttons that invoked subdialogs such as a dialog for code generation settings, a dialog for warning/error settings, and so on.

The Commando dialog would show you the command being constructed, and if you accepted it that would be entered into your terminal.

[1] A/UX had three ways it could run. (1) Console only, which used your Mac display as one big terminal, (2) GUI using X, which used the Mac display as as an X server, and (3) System 7, which ran a modified Mac System 7 on top of Unix, with System 7 having control of the GUI, and had a Mac terminal program that could run Unix processes.

Re:Installing A/UX on the Quadra 610 (2018) by skissane on Thursday December 26, 2019 @01:29AM (#21882336)
IBM i (previously called OS/400, the operating system of the IBM AS/400) has a similar feature. At the command prompt, you type a command name then press a function key and it brings up a (text-mode) fill-form UI you can use to specify command arguments.

Part of how it works – on Unix, command arguments are just a list of strings, and any option parsing (etc.) has to be done by the code of each command. By contrast, on IBM i, there is a declarative language used to define the syntax of the command (allowed options/arguments, what values are allowed for each, etc.) The declarative command definition is compiled into binary form and installed into the system. When you run a command, the operating system uses the installed command definition to parse and validate the parameters and marshal them into a memory block. If the parameters are invalid, then the OS produces the error and the command executable never even starts. If the parameters are valid, the memory block gets passed to the command's code. These same declarative command declarations are what gets used to generate the fill-in form UI.

Re:Installing A/UX on the Quadra 610 (2018) by Annatar on Thursday December 26, 2019 @04:49AM (#21882847)
That's an ingenious solution. Whoever thought of that was very, very smart, forward looking and insightful. We need to bring that into illumos, the runtime linker in illumos already has capability to do all sorts of things before the excutable even starts, so it would be the perfect place to plug into. It can easily be made optional, so programs which do not generate this declarative part will continue to function unmodified and nothing will be broken.

Just to set the record straight though, while the options in UNIX programs are very different from program to program, good UNIX programmers know to use getopt(3C) libc function and not invent their own custom parser. All programs which use getopt(3C) have a uniform, consistent option parser and command line behavior. https://illumos.org/man/3c/getopt

Re:Installing A/UX on the Quadra 610 (2018) by floatboth on Thursday December 26, 2019 @08:21AM (#21883588)
If only http://docopt.org was invented and standardized and widely adopted in the 80s…

> good UNIX programmers know to use getopt(3C) libc function

Well, when writing in C. People don't really use this from other languages.

Re:Installing A/UX on the Quadra 610 (2018) by ohithereyou on Thursday December 26, 2019 @10:52AM (#21884600)
We use getopt style command line parameter parsing in at least Java, Perl, Python, and BASH at work, so I wouldn't say that this is unused.

We're also primarily a UNIX shop at work, so that might be part of it.

Re:Installing A/UX on the Quadra 610 (2018) by anthk on Thursday December 26, 2019 @12:41AM (#21882212)
ESC-v under vi-mode, Ctrl-x-e in emacs-mode.

It just invokes your $EDITOR on the command you are typing/editing.

But the best environment ever is Acme under 9front/plan9, as a "shell/editor/mail client/music player/kitchen sink" powns both vi, ed and Emacs. It has structural regular expresions, full mouse support (and far better than gvim), an embedded terminal and a plumber, which is like xdg-open on steroids, crack and LSD at once.

Using plan9port is not the same, 9front/plan9 has a lot of additions on top of that.

Re:Installing A/UX on the Quadra 610 (2018) by crazysim on Thursday December 26, 2019 @03:32AM (#21882625)
That description reminds me a bit of Powershell's Show-Command. It doesn't seem as rich as you've described Commando to be and it's not the same as three "..." but it's something.