losing input when switching from CBREAK to COOKED in SunOS-4

dupuy at cs.columbia.edu dupuy at cs.columbia.edu
Wed Feb 21 04:51:12 AEST 1990


 > > I have a problem with typeahead in my interactions with tcsh on SunOS-4.
 > > The input buffer seems to be flushed when the shell switches from CBREAK
 > > to COOKED.

 > I noticed that SunOS 4.0 csh does not have this problem.  Does anyone have
 > source for this that can find out what it is doing to combat the flushed
 > typeahead?

The file completion in the "regular" csh provided in 4.3 BSD and SunOS 4.0
doesn't use CBREAK mode - it is always running in COOKED.  It sets ESC to
be the second end-of-line character so that whenever the user types ESC,
the shell gets the current line.  It then retypes over the existing line,
adding any file completion.  However, this method doesn't allow more than
one special character, and thus can't be used for custom line editing like
tcsh, ksh, and bash provide.



More information about the Comp.sys.sun mailing list