Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!ukc!castle!etive!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.questions Subject: Re: Strangeness in shell Message-ID: <673@skye.ed.ac.uk> Date: 3 Aug 89 19:02:45 GMT References: <432@mccc.UUCP> <9700009@osiris.cso.uiuc.edu> <2277@auspex.auspex.com> <10639@smoke.BRL.MIL> <5404@ficc.uu.net> <10650@smoke.BRL.MIL> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 27 ]-] Some of us think the right place is in the terminal! ]-The one problem with this approach is that you really should only maintain ]-a command line history when you're in canonical mode (ICANON, or COOKED). ]The terminal shouldn't know what a "command line" is. Therefore it ]shouldn't be making this distinction. I snarf&barf text freely between ]editor displays, command lines, and other text sources/sinks all the time. Sure, but there's more to command-line editing than "snarf&barf". If you want to always be able to get your previous shell command by typing control-P, and would like that to work in Lisp and /bin/cat as well, but you also want control-P to be passed direct to emacs, then it's fairly difficult for a terminal on a serial line to keep track. It should be possible (if you have ptys) to write a program that provides you with line-based command editing only when the terminal is in cooked mode. (It would be rather like "script".) At present that requires checking the terminal mode for each character typed - it would be nice if there were a pty mode that told you when ioctls are done on the slave side. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin