smb@ulysses.att.com (02/24/90)
| 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....