Bash Version: 4.1
Patch Level: 5
Release Status: release
Description:
     bash / readline currently forces terminals into character-at-a-time 
operation. This is unfriendly for users on slow networks or networks with high 
per-byte fees. Since 1989 there has been an approach called LINEMODE for 
clients to interact with remote servers while still handling all line editing 
and character processing locally. (See RFC1116 and RFC1184.) But this feature 
is rendered useless when such ubiquitous software as bash and readline force 
character-at-a-time processing.
Repeat-By:
     Try to connect to your favorite server using a cellphone network 
connection. Aside from the terrible input lag, if you do this while roaming 
you'll run up a nasty bill at the same time. If you happen to have an up to 
date Telnet client and a BSD server, you'll notice that input responsiveness 
is a lot better, as long as you use a "dumb" shell. You can't repeat this 
experiment on current Linux systems because the Linux kernel never adopted the 
tty driver feature needed to support it.
Fix:
     The attached patch will make readline check for the EXTPROC tty mode and 
bypass most of its I/O processing features if EXTPROC is detected. (Input 
prompt handling must still be done.)
     Patches for the Linux kernel to support the EXTPROC features are 
available here
         http://lkml.org/lkml/2010/6/11/403
     Patches to get Telnet working with the Linux support are available here
         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585527
     Preliminary patches to get OpenSSH working with linemode are available here
         http://marc.info/?l=openssh-unix-dev&m=127655706101347&w=2
Note that these OpenSSH patches were a very rough cut. I'll be posting an 
updated patch shortly that also supports command history. In the meantime I'm 
working on further readline patches to support command completion between the 
client and the server. (And no one will be more surprised than me if that 
actually works...)
This combination of patches is giving me pretty reasonable terminal behavior 
now, but obviously a lot of it is rough. Feedback appreciated.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/