[comp.sys.sun] File completion in csh

tml@goanna.cs.rmit.oz.au (Timothy Liddelow) (03/23/91)

Why is it that on my distributed SPARC system that when file completion in
csh is set, it doesn't work properly ?  If escape is pressed on the
command line, the command is simply not recognised.  This only happens on
the client machine, not the server.  As the file completion must obviously
read the current directory, could that be the problem that my machine has
to read the remote disk ?

dav@genisco.gtc.com (David L. Markowitz) (04/02/91)

In comp.sys.sun tml@goanna.cs.rmit.oz.au (Timothy Liddelow) writes:

>Why is it that on my distributed SPARC system that when file completion in
>csh is set, it doesn't work properly ?  If escape is pressed on the
>command line, the command is simply not recognised.  This only happens on
>the client machine, not the server.  As the file completion must obviously
>read the current directory, could that be the problem that my machine has
>to read the remote disk ?

It sounds like you are trying to do file completion in a text subwindow
(i.e. a commandtool).  File completion won't work in text subwindows, but
will work on the raw console (no window system), in shelltools, and on
real terminals.  Note that this is true under both sunview and open
windows.

	David L. Markowitz
	Genisco Technology Corporation
	dav@gtc.com

jbiggs@relay.eu.net (John Biggs) (04/02/91)

tml@goanna.cs.rmit.oz.au (Timothy Liddelow) writes:

>Why is it that on my distributed SPARC system that when file completion in
>csh is set, it doesn't work properly ?  If escape is pressed on the
>command line, the command is simply not recognised.  This only happens on
>the client machine, not the server.  As the file completion must obviously
>read the current directory, could that be the problem that my machine has
>to read the remote disk ?

I too have found that filec does not work in a cmdtool (which uses the
sun-cmd termcap entry).  It appears that whilst pressing ESC does actually
perform the file completion it also has a similar effect to pressing ^U as
the command line is nullified but not erased from the screen.  This can be
proved by having a look at the command history which shows now record of
the command being typed.  What I have discovered is that rlogging into
your own machine does in fact cure the problem and filec works perfectly,
although I am still using the same sun-cmd termcap entry. So what
difference does it make rlogging into your own machine? 

--John Biggs (jbiggs@armltd.uucp)

guy@uunet.uu.net (Guy Harris) (04/17/91)

>So what difference does it make rlogging into your own machine? 

"rlogin" runs in non-canonical mode, so it causes the command tool to stop
usurping the functions of the tty driver, and just pass keystrokes through
to the pseudo-tty.

Given that the problem with file name completion in a command tool is that
the C shell performs some unnatural acts with the tty driver (TIOCSTI with
echo off), and given that the command subwindow code, when a process does
a TIOCSTI with echo off, doesn't do what the C shell would expect the tty
driver to do, as long as the command tool is acting as the tty driver,
file name completion doesn't work.  The "rlogin" makes it stop doing that,
so file name completion starts working.

hugh@slee01.srl.ford.com (Hugh Fader) (04/24/91)

In article <2428@brchh104.bnr.ca> auspex!guy@uunet.uu.net (Guy Harris) writes:

>"rlogin" runs in non-canonical mode, so it causes the command tool to stop
>usurping the functions of the tty driver, and just pass keystrokes through
>to the pseudo-tty.

Does anyone know how to make the command tool run in non-canonical mode
without doing the rlogin? It seems like this would be a good way to make
tcsh work in a cmdtool.  Perhaps a better question is: Does anyone know
when we can expect Sun to fix cmdtool?

Hugh Fader
hugh@slee01.srl.ford.com

guy@uunet.uu.net (Guy Harris) (05/10/91)

>Does anyone know how to make the command tool run in non-canonical mode
>without doing the rlogin?

Not without whacking the terminal subwindow source.

>Perhaps a better question is: Does anyone know when we can expect Sun to
>fix cmdtool?

I don't expect the SunView version to ever be fixed; SunView is old news
at this point.  They may fix the XView version at some point, although I
don't expect to see such a fix before Sun's S5R4-based release (the S5R4
pseudo-tty mechanism supports "ioctl snooping" better than does the old
SunOS pseudo-tty mechanism, although I'm told there are bugs in the S5R4
stuff as it comes from AT&T).

Note that while better "ioctl snooping" is necessary, but it is not
sufficient; the command tool would have to know how to properly handle
TIOCSTI'ed characters when echo is off.