Strangeness in shell
Richard Tobin
richard at aiai.ed.ac.uk
Fri Aug 4 05:02:45 AEST 1989
]-] 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 at uk.ac.ed
AI Applications Institute, ARPA: R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin
More information about the Comp.unix.questions
mailing list