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.
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
> good UNIX programmers know to use getopt(3C) libc function
Well, when writing in C. People don't really use this from other languages.
We're also primarily a UNIX shop at work, so that might be part of it.
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.
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.