[comp.unix.questions] File completion in BSD4.3-derived CSH

mleech@bcarh342.bnr.ca (Marcus Leech) (05/09/90)

I didn't want to clutter up comp.unix.wizards with this one.

Can someone explain to me the mechanism used by the BSD4.3 CSH
  to implement file completion, given that, as far as I can tell,
  it runs the TTY in COOKED mode?  I have Apollos and HP9000/3xx
  with the BSD4.3 CSH.  Both systems have file completion, but I
  can't figure out HOW the CSH gets to see the ESC char given that
  it runs the TTY in COOKED mode.  Someone care to enlighthen me?
I looked for an "alternate" line-discipline, but CSh uses the default
  regular line-discipline.  On the HP, there's no V7ish "alternate
  line-terminator character" that it could be setting to ESC.  I'm
  quite puzzled.
-----------------
Marcus Leech, 4Y11             Bell-Northern Research  |opinions expressed
mleech@bnr.ca                  P.O. Box 3511, Stn. C   |are my own, and not
VE3MDL@VE3JF.ON.CAN.NA         Ottawa, ON, CANADA      |necessarily BNRs

net@tub.UUCP (Oliver Laumann) (05/09/90)

In article <1990May8.222108.23839@bnrgate.bnr.ca> mleech@bcarh342.bnr.ca (Marcus Leech) writes:
> Can someone explain to me the mechanism used by the BSD4.3 CSH
>   to implement file completion, given that, as far as I can tell,
>   it runs the TTY in COOKED mode?  I have Apollos and HP9000/3xx
>   with the BSD4.3 CSH.  Both systems have file completion, but I
>   can't figure out HOW the CSH gets to see the ESC char given that
>   it runs the TTY in COOKED mode.  Someone care to enlighthen me?

It's implemented by means of the secondary input delimiter character
(`t_brkc' in the `tchars' structure; see "man 4 tty").  When this field
is set to a character other than `-1', this character acts the same way
newline does (i.e. it is echoed, and then the current input line is made
available to the program).

--
Oliver Laumann     net@TUB.BITNET     net@tub.cs.tu-berlin.de     net@tub.UUCP