|
|
Invisible wrote:
> Well, currently a program's arguments are just a giant blob of text. The
> OS does nothing more than hand it over to the program, which may then
> interpret them in any way it pleases. This is LCD; it works for
> everything, but it's not terribly sophisticated.
>
> How about if, say, the program could somehow "tell" the OS what
> arguments it actually accepts? (In the same way a program file usually
> contains metadata to "tell" the OS all kinds of other stuff about it,
> such as linking information.) Then the OS could report invalid argument
> names without even needing to bother actually starting the program
> itself. And just think of the auto-complete possibilities.
>
> Hey, let's go one better. The majority of CLI arguments are either
> on/off switches or filenames, right? Well what if we *tell* the OS what
> things are on/off switches, and that their default state should be? What
> if we *tell* it which things are supposed to be filenames? (And whether
> the name in question *should* or *should not* exist when the program is
> run? Or whether it should be a *file* or a *directory*? Or maybe even
> the name of another program?)
You don't need a whole new OS for that.
Recent versions of bash come preconfigured for smart autocomplete. Random
example:
apt-get remove <tab> completes package names you already have installed.
Or look at fish (my current shell). It colors the stuff you type in real
time. Type ls --srot and it will show red, so you know you
mispelled --sort.
http://www.fishshell.org/screenshots.html
Post a reply to this message
|
|