Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 1999 20:34:59 -0700
From:      Parag Patel <parag@cgt.com>
To:        Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk>
Cc:        "Matthew N. Dodd" <winter@jurai.net>, "Daniel O'Connor" <darius@dons.net.au>, freebsd-hackers@FreeBSD.ORG
Subject:   Command-line editing [was NetWare client in -current]
Message-ID:  <2138.937280099@pinhead.parag.codegen.com>
In-Reply-To: Message from Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk>  of "Mon, 13 Sep 1999 09:23:36 BST." <19990913092335.A35751@voodoo.pandhm.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 Sep 1999 09:23:36 BST, Dominic Mitchell wrote:
>
>On Fri, Sep 10, 1999 at 11:15:12AM -0700, Parag Patel wrote:
>> Growing up programming on a KL-10, I still think the correct place for
>> line-editing is in the driver.  Hell - it's already doing basic
>> erase/kill line editing as it is.  Then you don't have to hack every
>> command-line app to get line-editing.
>
>Yeah, but how do you specify completion then?

Same way termcap/termlib would be handled. :)

I was toying with an ioctl or some-such that gave the termcap info to
the driver in one block.  Shouldn't be any harder to run a small daemon
responsible for returning file-name completion info to the driver,
assuming it can't get the info by itself from the file-system layer.

The KL even did command *option* completion.  It partly loaded an
executable - just enough to run its command-line parsing stuff - to
handle expanding options and displaying help.  'Course it cheated on the
termcap/lib stuff.  You could use any terminal as long as it was a
VT100-compatible one.  Pity most OSes don't even match TOPS in many areas.


>Unix went here a long time ago and backed out of it.  Have a look at the
>paper http://www.cs.princeton.edu/~jlk/kornshell/doc/vhll.ps.gz (linked
>from www.kornshell.com) in particular, the history section.

Yeah, I read it, but it doesn't say why they never put it in the driver.
Just that he put it in ksh because the driver work had stalled for
whatever reason.



On Mon, 13 Sep 1999 09:09:52 PDT, Matthew Jacob wrote:
>
>Yeah, and this is why VMS 4.X (early) had a terrific security bug- if you
>type '#' (or was it '&') as the first character after you logged in, your
>accounting records for that session were wiped.

Strawman.  Really, just because one crappy OS has a crappy driver with
one bug is no reason to completely throw out the idea.


>No, a driver is *not* the place to put this kind of fooling around.

But making each and every complex command-line app have to deal with
this itself or link to N different command-line editing libraries *is*
OK?  And why is the driver performing backspace and kill processing and
all sorts of other complicated crap like cooked vs raw?

Either the driver should be really dumb and hand off *everything*
through some user-level filter/app, or it should be capable of doing
everything itself.  Moving vpty handling out of the kernel would be a
good start.


	-- Parag Patel


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2138.937280099>