[COFF] Other OSes?

Perry E. Metzger perry at piermont.com
Mon Jul 9 10:11:51 AEST 2018


On Sun, 8 Jul 2018 16:27:54 -0700 Bakul Shah <bakul at bitblocks.com>
wrote:
> On Jul 8, 2018, at 1:50 PM, Perry E. Metzger <perry at piermont.com>
> wrote:
> > 
> > On Thu, 5 Jul 2018 15:56:50 +1000 Warren Toomey <wkt at tuhs.org>
> > wrote:  
> >> OK, I guess I'll be the one to start things going on the COFF
> >> list.
> >> 
> >> What other features, ideas etc. were available in other operating
> >> systems which Unix should have picked up but didn't?
> >> 
> >> [ Yes, I know, it's on-topic for TUHS but I doubt it will be for
> >> long! ]  
> > 
> > A minor feature that I might mention: TOPS-20 CMND JSYS style
> > command completion. TL;DR, this feature could now be implemented,
> > as after decades of wanting it I finally know how to do it in a
> > unixy way.
> > 
> > In TOPS-20, any time you were at the EXEC (the equivalent of the
> > shell), you could hit "?" and the thing would tell you what
> > options there were for the next thing you could type, and you
> > could hit ESC to complete the current thing. This was Very Very
> > Nice, as flags and options to programs were all easily
> > discoverable and you had a handy reminder mechanism when you
> > forgot what you wanted.
> > 
> > bash has some vague lame equivalents of this (it will complete
> > filenames if you hit tab etc.), and if you write special scripts
> > you can add domain knowledge into bash of particular programs to
> > allow for special application-specific completion, but overall
> > it's kind of lame.
> > 
> > Here's the Correct Way to implement this: have programs implement
> > a special flag that allows them to tell the shell how to do
> > completion for them! I got this idea from this feature being
> > hacked in, in an ad hoc way, into clang:
> > 
> > http://blog.llvm.org/2017/09/clang-bash-better-auto-completion-is.html
> > 
> > but it is apparent that with a bit of work, one could standardize
> > such a feature and allow nearly any program to provide the shell
> > with such information, which would be very cool. Best of all,
> > it's still unixy in spirit (IMHO).  
> 
> I believe autocompletion has been available for 20+ years. IIRC, I
> switched to zsh in 1995 and it has had autocompletion then. But you
> do have to teach zsh/bash how to autocomplete for a given program.
> For instance

Yes, that's the point. You have to write it for the programs and the
programs have no way to convey to the shell what they want. this
fixes that.

> This sort of magic incantation is needed because no one has bothered
> to create a simple library for autocompletion & no standard
> convention has sprung up that a program can use.

Yes, I know. That's exactly what I'm explaining. Read the URL above.
It describes a quite general mechanism for a program to convey to the
shell, without needing any special binary support, how autocompletion
should work.

Perry
-- 
Perry E. Metzger		perry at piermont.com


More information about the COFF mailing list