Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: smb@ulysses.att.com Newsgroups: comp.sys.sun Subject: Re: losing input when switching from CBREAK to COOKED in SunO Keywords: SunOS Message-ID: <5260@brazos.Rice.edu> Date: 23 Feb 90 19:31:32 GMT Sender: news@rice.edu Organization: Sun-Spots Lines: 21 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n41, Replies: v9n43 v9n52 X-Sun-Spots-Digest: Volume 9, Issue 53, message 7 | 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. Umm -- not true; that's exactly what ksh does. I know -- I helped Dave Korn design that part of ksh... More precisely, ksh runs in cooked mode until ESC has been typed; after that, it runs in CBREAK mode. On Berkeley-derived systems -- those that have CTLECHO -- ESC is the alternate end-of-line character. It's a little weirder on System V, because you have to ensure that ESC isn't echoed -- it can upset your terminal.... The scheme we devised was to make ESC the *eof* character -- and make ^D the alternate end-of-line character. This relies on some ancient behavior of the tty driver -- it doesn't echo EOF (or rather, the character defined to be EOF), because that made Model 35 Teletypes hangup....